Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::EmptyHtmlFilter Class Reference

#include "empty_html_filter.h"

Inheritance diagram for net_instaweb::EmptyHtmlFilter:
net_instaweb::HtmlFilter net_instaweb::AddHeadFilter net_instaweb::AddIdsFilter net_instaweb::AmpDocumentFilter net_instaweb::BaseTagFilter net_instaweb::CanonicalAttributes net_instaweb::CollapseWhitespaceFilter net_instaweb::CommonFilter net_instaweb::CssInlineImportToLinkFilter net_instaweb::DebugFilter net_instaweb::DecodeRewrittenUrlsFilter net_instaweb::DisableTestFilter net_instaweb::ElideAttributesFilter net_instaweb::ExplicitCloseTag net_instaweb::FixReflowFilter net_instaweb::GoogleAnalyticsFilter net_instaweb::HandleNoscriptRedirectFilter net_instaweb::HtmlAttributeQuoteRemoval net_instaweb::LoggingFilter net_instaweb::MockFilter net_instaweb::PedanticFilter net_instaweb::RemoveCommentsFilter net_instaweb::RewrittenContentScanningFilter net_instaweb::ScanFilter net_instaweb::StripScriptsFilter net_instaweb::StripSubresourceHintsFilter net_instaweb::SupportNoscriptFilter

Public Member Functions

virtual void StartDocument ()
virtual void EndDocument ()
virtual void StartElement (HtmlElement *element)
virtual void EndElement (HtmlElement *element)
virtual void Cdata (HtmlCdataNode *cdata)
 Called for CDATA blocks (e.g. <![CDATA[foobar]]>)
virtual void Comment (HtmlCommentNode *comment)
 Called for HTML comments that aren't IE directives (e.g. ).
virtual void IEDirective (HtmlIEDirectiveNode *directive)
virtual void Characters (HtmlCharactersNode *characters)
 Called for raw characters between tags.
virtual void Directive (HtmlDirectiveNode *directive)
 Called for HTML directives (e.g. <!doctype foobar>).
virtual void Flush ()
virtual void DetermineEnabled (GoogleString *disabled_reason)
virtual bool CanModifyUrls ()
ScriptUsage GetScriptUsage () const override
- Public Member Functions inherited from net_instaweb::HtmlFilter
virtual void RenderDone ()
bool is_enabled () const
void set_is_enabled (bool is_enabled)
virtual const char * Name () const =0
 The name of this filter – used for logging and debugging.

Additional Inherited Members

- Public Types inherited from net_instaweb::HtmlFilter
enum  ScriptUsage { kWillInjectScripts, kMayInjectScripts, kNeverInjectsScripts }
 Describes a filter's relationship with scripts. More...

Detailed Description

Base class for rewriting filters that don't need to be sure to override every filter method. Other filters that need to be sure they override every method would derive directly from HtmlFilter.

Member Function Documentation

virtual bool net_instaweb::EmptyHtmlFilter::CanModifyUrls ( )

This filter and derived classes will not rewrite urls. If a derived filter wants to rewrite urls, override this function.

Implements net_instaweb::HtmlFilter.

Reimplemented in net_instaweb::RewriteFilter.

virtual void net_instaweb::EmptyHtmlFilter::DetermineEnabled ( GoogleString disabled_reason)
virtual void net_instaweb::EmptyHtmlFilter::EndDocument ( )
virtual void net_instaweb::EmptyHtmlFilter::Flush ( )

Notifies the Filter that a flush is occurring. A filter that's generating streamed output should flush at this time. A filter that's mutating elements can mutate any element seen since the most recent flush; once an element is flushed it is already on the wire to its destination and it's too late to mutate. Flush is initiated by an application calling HttpParse::Flush().

Flush() is called after all other handlers during a HttpParse::Flush(), except RenderDone(), which (if in use) happens after Flush().

Implements net_instaweb::HtmlFilter.

Reimplemented in net_instaweb::CombiningFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::JsCombineFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::CssCombineFilter, net_instaweb::MetaTagFilter, net_instaweb::ScanFilter, net_instaweb::CssOutlineFilter, net_instaweb::JsOutlineFilter, net_instaweb::DebugFilter, net_instaweb::FlushHtmlFilter, and net_instaweb::AddHeadFilter.

ScriptUsage net_instaweb::EmptyHtmlFilter::GetScriptUsage ( ) const

Invoked by the rewrite driver to query whether this filter may inject scripts.

Implements net_instaweb::HtmlFilter.

virtual void net_instaweb::EmptyHtmlFilter::IEDirective ( HtmlIEDirectiveNode directive)

Called for an IE directive; typically used for CSS styling. See

TODO(mdsteele): Should we try to maintain the nested structure of the conditionals, in the same way that we maintain nesting of elements?

Implements net_instaweb::HtmlFilter.

Reimplemented in net_instaweb::GoogleAnalyticsFilter, net_instaweb::JsCombineFilter, net_instaweb::LoggingFilter, net_instaweb::JavascriptFilter, net_instaweb::CssCombineFilter, and net_instaweb::ScanFilter.

virtual void net_instaweb::EmptyHtmlFilter::StartDocument ( )
virtual void net_instaweb::EmptyHtmlFilter::StartElement ( HtmlElement element)

The documentation for this class was generated from the following file: