Page Speed Optimization Libraries
1.9.32.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
net
instaweb
rewriter
public
collect_flush_early_content_filter.h
Go to the documentation of this file.
1
/*
2
* Copyright 2012 Google Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http:///www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
17
18
#ifndef NET_INSTAWEB_REWRITER_PUBLIC_COLLECT_FLUSH_EARLY_CONTENT_FILTER_H_
19
#define NET_INSTAWEB_REWRITER_PUBLIC_COLLECT_FLUSH_EARLY_CONTENT_FILTER_H_
20
21
#include "net/instaweb/htmlparse/public/html_name.h"
22
#include "net/instaweb/http/public/semantic_type.h"
23
#include "
net/instaweb/rewriter/public/rewrite_filter.h
"
24
#include "
net/instaweb/rewriter/public/rewrite_options.h
"
25
#include "
net/instaweb/util/public/basictypes.h
"
26
#include "
net/instaweb/util/public/string.h
"
27
#include "
net/instaweb/util/public/string_util.h
"
28
29
namespace
net_instaweb {
30
31
class
HtmlElement;
32
class
RewriteDriver;
33
43
class
CollectFlushEarlyContentFilter
:
public
RewriteFilter
{
44
public
:
45
explicit
CollectFlushEarlyContentFilter
(
RewriteDriver
* driver);
46
47
virtual
void
StartDocumentImpl
();
48
virtual
void
EndDocument();
49
virtual
void
StartElementImpl(HtmlElement* element);
50
virtual
void
EndElementImpl(HtmlElement* element);
51
52
virtual
const
char
* Name()
const
{
53
return
"Collect Flush Early Content Filter"
;
54
}
55
virtual
const
char
* id()
const
{
56
return
RewriteOptions::kCollectFlushEarlyContentFilterId;
57
}
58
59
protected
:
60
virtual
void
Clear();
61
62
private
:
63
class
Context;
64
65
void
AppendToHtml(StringPiece url, semantic_type::Category category,
66
HtmlElement* element);
67
void
AppendAttribute(HtmlName::Keyword keyword, HtmlElement* element);
69
virtual
bool
UsesPropertyCacheDomCohort()
const
{
return
true
; }
70
72
bool
found_resource_;
73
bool
should_collect_critical_css_;
74
GoogleString resource_html_;
75
76
DISALLOW_COPY_AND_ASSIGN(
CollectFlushEarlyContentFilter
);
77
};
78
79
}
80
81
#endif
string.h
string_util.h
net_instaweb::CollectFlushEarlyContentFilter::StartDocumentImpl
virtual void StartDocumentImpl()
net_instaweb::RewriteFilter
Definition:
rewrite_filter.h:37
net_instaweb::RewriteDriver
Definition:
rewrite_driver.h:98
rewrite_options.h
rewrite_filter.h
net_instaweb::CollectFlushEarlyContentFilter
Definition:
collect_flush_early_content_filter.h:43
basictypes.h
Generated on Thu Sep 11 2014 11:27:05 for Page Speed Optimization Libraries by
1.8.6