19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_LAZYLOAD_IMAGES_FILTER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_LAZYLOAD_IMAGES_FILTER_H_
28 #include "pagespeed/opt/logging/enums.pb.h"
30 namespace net_instaweb {
32 class StaticAssetManager;
78 static const char* kImageLazyloadCode;
79 static const char* kImageOnloadCode;
80 static const char* kLoadAllImages;
81 static const char* kOverrideAttributeFunctions;
82 static const char* kIsLazyloadScriptInsertedPropertyName;
87 virtual const char*
Name()
const {
return "Lazyload Images"; }
91 static void Terminate();
100 virtual void StartDocumentImpl();
101 virtual void EndDocument();
102 virtual void StartElementImpl(
HtmlElement* element);
104 virtual void DetermineEnabled(
GoogleString* disabled_reason);
118 void InsertOverrideAttributesScript(
HtmlElement* element,
119 bool is_before_script);
129 bool main_script_inserted_;
134 bool abort_script_inserted_;
137 int num_images_lazily_loaded_;
Definition: common_filter.h:47
Definition: static_asset_manager.h:48
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
Definition: html_element.h:42
ScriptUsage GetScriptUsage() const override
Definition: lazyload_images_filter.h:88
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
ScriptUsage
Describes a filter's relationship with scripts.
Definition: html_filter.h:38
Definition: rewrite_driver.h:100
Definition: html_filter.h:43
Definition: lazyload_images_filter.h:76
Definition: rewrite_options.h:84
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: lazyload_images_filter.h:87
static RewriterHtmlApplication::Status ShouldApply(RewriteDriver *driver)
Lazyload filter will be no op for the request if ShouldApply returns false.