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

#include "mobilize_label_filter.h"

Inheritance diagram for net_instaweb::MobilizeLabelFilter:
net_instaweb::CommonFilter

Public Member Functions

 MobilizeLabelFilter (RewriteDriver *driver)
 
virtual const char * Name () const
 
virtual void StartDocumentImpl ()
 
virtual void StartElementImpl (HtmlElement *element)
 
virtual void EndElementImpl (HtmlElement *element)
 
virtual void EndDocument ()
 
- Public Member Functions inherited from net_instaweb::CommonFilter
 CommonFilter (RewriteDriver *driver)
 
const GoogleUrl & base_url () const
 Getters. More...
 
const GoogleUrl & decoded_base_url () const
 
RewriteDriverdriver () 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
 

Static Public Member Functions

static void InitStats (Statistics *statistics)
 
- Static Public Member Functions inherited from net_instaweb::CommonFilter
static bool ExtractMetaTagDetails (const HtmlElement &element, const ResponseHeaders *headers, GoogleString *content, GoogleString *mime_type, GoogleString *charset)
 

Static Public Attributes

static const char kPagesLabeled []
 Monitoring variable names. More...
 
static const char kPagesRoleAdded []
 
static const char kNavigationalRoles []
 
static const char kHeaderRoles []
 
static const char kContentRoles []
 
static const char kMarginalRoles []
 
- Static Public Attributes inherited from net_instaweb::CommonFilter
static const char kCreateResourceFailedDebugMsg []
 Debug message to be inserted when resource creation fails.
 

Additional Inherited Members

- Protected Member Functions inherited from net_instaweb::CommonFilter
ServerContextserver_context () const
 
const RewriteOptionsrewrite_options ()
 
virtual const char * LoggingId ()
 

Detailed Description

Classify DOM elements by adding importance= attributes so that the MoblizeRewriteFilter can rewrite them to be mobile-friendly. The classes are: Navigational: things like nav and menu bars, mostly in the header Header: Page title, title image, logo associated with page, etc. Content: The content we think the user wants to see. Marginal: Other stuff on the page that typically resides in the margins, header, or footer. Initially we just attempt Navigational and Header classification.

Todo:

TODO(jmaessen): do the rest of the classification. We do this bottom-up, since we want to process children in a streaming fashion before their parent's close tag. We take the presence of html5 tags as authoritative (though in practice this might not be the case), but we've assumed that they're authoritative in training our classifiers.

TODO(jmaessen): use actual classifier output.

Member Function Documentation

virtual void net_instaweb::MobilizeLabelFilter::StartDocumentImpl ( )
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.

Member Data Documentation

const char net_instaweb::MobilizeLabelFilter::kPagesLabeled[]
static

Monitoring variable names.

Pages run through labeler.


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