Page Speed Optimization Libraries
1.11.33.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
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/rewriter/public/rewrite_driver.h
"
22
#include "
net/instaweb/rewriter/public/rewrite_filter.h
"
23
#include "
net/instaweb/rewriter/public/rewrite_options.h
"
24
#include "pagespeed/kernel/base/basictypes.h"
25
#include "pagespeed/kernel/base/string.h"
26
#include "pagespeed/kernel/base/string_util.h"
27
#include "pagespeed/kernel/html/html_element.h"
28
#include "pagespeed/kernel/html/html_name.h"
29
#include "pagespeed/kernel/http/semantic_type.h"
30
31
namespace
net_instaweb {
32
42
class
CollectFlushEarlyContentFilter
:
public
RewriteFilter
{
43
public
:
44
explicit
CollectFlushEarlyContentFilter
(
RewriteDriver
* driver);
45
46
virtual
void
StartDocumentImpl
();
47
virtual
void
EndDocument();
48
virtual
void
StartElementImpl(HtmlElement* element);
49
virtual
void
EndElementImpl(HtmlElement* element);
50
51
virtual
const
char
* Name()
const
{
52
return
"Collect Flush Early Content Filter"
;
53
}
54
virtual
const
char
* id()
const
{
55
return
RewriteOptions::kCollectFlushEarlyContentFilterId;
56
}
57
58
protected
:
59
virtual
void
Clear();
60
61
private
:
62
class
Context;
63
64
void
AppendToHtml(StringPiece url, semantic_type::Category category,
65
HtmlElement* element);
66
void
AppendAttribute(HtmlName::Keyword keyword, HtmlElement* element);
68
virtual
bool
UsesPropertyCacheDomCohort()
const
{
return
true
; }
69
71
bool
found_resource_;
72
bool
should_collect_critical_css_;
73
GoogleString resource_html_;
74
75
76
};
77
78
}
79
80
#endif
net_instaweb::CollectFlushEarlyContentFilter::StartDocumentImpl
virtual void StartDocumentImpl()
rewrite_driver.h
net_instaweb::RewriteFilter
Definition:
rewrite_filter.h:35
net_instaweb::RewriteDriver
Definition:
rewrite_driver.h:98
rewrite_options.h
rewrite_filter.h
net_instaweb::CollectFlushEarlyContentFilter
Definition:
collect_flush_early_content_filter.h:42
Generated on Fri May 13 2016 15:33:58 for Page Speed Optimization Libraries by
1.8.6