Page Speed Optimization Libraries  1.3.25.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Protected Member Functions
net_instaweb::FlushEarlyContentWriterFilter Class Reference

#include "flush_early_content_writer_filter.h"

Inheritance diagram for net_instaweb::FlushEarlyContentWriterFilter:
net_instaweb::HtmlWriterFilter net_instaweb::HtmlFilter

List of all members.

Public Member Functions

 FlushEarlyContentWriterFilter (RewriteDriver *driver)
virtual void StartDocument ()
virtual void EndDocument ()
 Note: EndDocument will be called imediately before the last Flush call.
virtual void StartElement (HtmlElement *element)
virtual void EndElement (HtmlElement *element)

Static Public Attributes

static const char kPrefetchLinkRelSubresourceHtml []
static const char kPrefetchImageTagHtml []
static const char kPrefetchStartTimeScript []
static const char kNumResourcesFlushedEarly []
static const char kPrefetchScriptTagHtml []
static const char kPrefetchLinkTagHtml []

Protected Member Functions

virtual void Clear ()
 Clear various variables for rewriting a new html file.

Detailed Description

FlushEarlyContentWriterFilter finds rewritten resources in the DOM and inserts HTML that makes the browser download them. Note that we set a NullWriter as the writer for this driver, and directly write whatever we need to the original writer.


Member Function Documentation

Starts a new document. Filters should clear their state in this function, as the same Filter instance may be used for multiple HTML documents.

Reimplemented from net_instaweb::HtmlWriterFilter.

When an HTML element is encountered during parsing, each filter's StartElement method is called. The HtmlElement lives for the entire duration of the document.

Todo:
TODO(jmarantz): consider passing handles rather than pointers and reference-counting them instead to save memory on long documents.

Reimplemented from net_instaweb::HtmlWriterFilter.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines