Page Speed Optimization Libraries
1.11.33.2
|
#include "mobilize_rewrite_filter.h"
Public Member Functions | |
MobilizeRewriteFilter (RewriteDriver *rewrite_driver) | |
virtual void | DetermineEnabled (GoogleString *disabled_reason) |
virtual void | StartDocumentImpl () |
virtual void | EndDocument () |
virtual void | RenderDone () |
virtual void | StartElementImpl (HtmlElement *element) |
virtual void | EndElementImpl (HtmlElement *element) |
virtual const char * | Name () const |
ScriptUsage | GetScriptUsage () const override |
![]() | |
CommonFilter (RewriteDriver *driver) | |
const GoogleUrl & | base_url () const |
Getters. More... | |
const GoogleUrl & | decoded_base_url () const |
RewriteDriver * | driver () const |
HtmlElement * | noscript_element () const |
void | InsertNodeAtBodyEnd (HtmlNode *data) |
virtual void | StartDocument () |
Note: Don't overload these methods, overload the implementers instead! | |
virtual void | StartElement (HtmlElement *element) |
virtual void | EndElement (HtmlElement *element) |
virtual void | Characters (HtmlCharactersNode *characters) |
ResourcePtr | CreateInputResource (StringPiece input_url, bool *is_authorized) |
ResourcePtr | CreateInputResourceOrInsertDebugComment (StringPiece input_url, HtmlElement *element) |
void | ResolveUrl (StringPiece input_url, GoogleUrl *out_url) |
bool | BaseUrlIsValid () const |
bool | DebugMode () const |
bool | CanAddPagespeedOnloadToImage (const HtmlElement &) |
virtual void | LogFilterModifiedContent () |
virtual RewriteDriver::InlineAuthorizationPolicy | AllowUnauthorizedDomain () const |
virtual bool | IntendedForInlining () const |
void | AddJsToElement (StringPiece js, HtmlElement *script) |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
static bool | IsApplicableFor (RewriteDriver *driver) |
True if options or request UA suggest we will actually do mobilization. | |
static bool | IsApplicableFor (const RewriteOptions *options, const char *user_agent, const UserAgentMatcher *matcher) |
![]() | |
static bool | ExtractMetaTagDetails (const HtmlElement &element, const ResponseHeaders *headers, GoogleString *content, GoogleString *mime_type, GoogleString *charset) |
Static Public Attributes | |
static const char | kPagesMobilized [] |
![]() | |
static const char | kCreateResourceFailedDebugMsg [] |
Debug message to be inserted when resource creation fails. | |
Friends | |
class | MobilizeRewriteFilterTest |
Used for overriding default behavior in testing. | |
Additional Inherited Members | |
![]() | |
ServerContext * | server_context () const |
const RewriteOptions * | rewrite_options () |
virtual const char * | LoggingId () |
Rewrite HTML to be mobile-friendly based on "data-mobile-role" attributes in the HTML tags. To reorganize the DOM, the filter puts containers at the end of the body into which we move tagged elements. The containers are later removed after the filter is done processing the document body. The filter applies the following transformations:
Remaining todos:
|
virtual |
Overload these implementer methods: Intentionally left abstract so that implementers don't forget to change the name from Blah to BlahImpl.
Implements net_instaweb::CommonFilter.