21 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_DOM_STATS_FILTER_H_
22 #define NET_INSTAWEB_REWRITER_PUBLIC_DOM_STATS_FILTER_H_
28 namespace net_instaweb {
42 virtual const char*
Name()
const {
return "Dom Statistics"; }
44 int num_img_tags()
const {
return num_img_tags_; }
45 int num_inlined_img_tags()
const {
return num_inlined_img_tags_; }
46 int num_external_css()
const {
return num_external_css_; }
47 int num_scripts()
const {
return num_scripts_; }
48 int num_critical_images_used()
const {
return num_critical_images_used_; }
51 virtual void StartDocumentImpl();
52 virtual void StartElementImpl(HtmlElement* element) {}
53 virtual void EndElementImpl(HtmlElement* element);
56 int num_inlined_img_tags_;
57 int num_external_css_;
59 int num_critical_images_used_;
60 ScriptTagScanner script_tag_scanner_;
Definition: common_filter.h:47
void Clear()
Clears all state associated with the filter.
Definition: rewrite_driver.h:100
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: dom_stats_filter.h:42
Counts some basic statistics observed as HTML is parsed.
Definition: dom_stats_filter.h:34