18 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_MAKE_SHOW_ADS_ASYNC_FILTER_H_
19 #define NET_INSTAWEB_REWRITER_PUBLIC_MAKE_SHOW_ADS_ASYNC_FILTER_H_
30 namespace net_instaweb {
39 static const char kShowAdsSnippetsConverted[];
40 static const char kShowAdsSnippetsNotConverted[];
41 static const char kShowAdsApiReplacedForAsync[];
50 virtual void StartElementImpl(
HtmlElement* element);
54 virtual const char*
Name()
const {
55 return "MakeShowAdsAsyncFilter";
68 bool IsApplicableShowAds(
70 ShowAdsSnippetParser::AttributeMap* parsed_attributes)
const;
75 void ReplaceShowAdsWithAdsByGoogleElement(
76 const ShowAdsSnippetParser::AttributeMap& parsed_attributes,
78 void ReplaceShowAdsApiCallWithAdsByGoogleApiCall(
114 bool has_ads_by_google_js_;
120 int32 num_pending_show_ads_api_call_replacements_;
125 Variable* show_ads_snippets_converted_count_;
126 Variable* show_ads_snippets_not_converted_count_;
127 Variable* show_ads_api_replaced_for_async_;
Definition: common_filter.h:47
ScriptUsage GetScriptUsage() const override
Definition: make_show_ads_async_filter.h:58
virtual const char * Name() const
Overrides HtmlFilter.
Definition: make_show_ads_async_filter.h:54
Definition: statistics.h:43
Leaf node representing raw characters in HTML.
Definition: html_node.h:167
Class that parses showads snippets.
Definition: show_ads_snippet_parser.h:30
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
virtual void StartDocumentImpl()
Overrides CommonFilter.
Definition: html_element.h:42
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
virtual void Characters(HtmlCharactersNode *characters)
Definition: make_show_ads_async_filter.h:37