Page Speed Optimization Libraries  1.9.32.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
split_html_beacon_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 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  */
16 
21 
22 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_SPLIT_HTML_BEACON_FILTER_H_
23 #define NET_INSTAWEB_REWRITER_PUBLIC_SPLIT_HTML_BEACON_FILTER_H_
24 
26 #include "pagespeed/kernel/base/basictypes.h"
27 
28 namespace net_instaweb {
29 
30 class HtmlElement;
31 class RewriteDriver;
32 class Statistics;
33 class Variable;
34 
37  public:
39  static const char kSplitHtmlBeaconAddedCount[];
40 
41  explicit SplitHtmlBeaconFilter(RewriteDriver* driver);
42  virtual ~SplitHtmlBeaconFilter() {}
43 
44  virtual void DetermineEnabled(GoogleString* disabled_reason);
45 
46  static void InitStats(Statistics* statistics);
47 
48  virtual void StartDocumentImpl() {}
49  virtual void EndDocument();
50  virtual void StartElementImpl(HtmlElement* element) {}
51  virtual void EndElementImpl(HtmlElement* element) {}
52  virtual const char* Name() const { return "SplitHtmlBeacon"; }
53 
59  static bool ShouldApply(RewriteDriver* driver);
60 
61  private:
62  Variable* split_html_beacon_added_count_;
63 
64  DISALLOW_COPY_AND_ASSIGN(SplitHtmlBeaconFilter);
65 };
66 
67 }
68 
69 #endif
Definition: common_filter.h:48
virtual void StartDocumentImpl()
Definition: split_html_beacon_filter.h:48
static bool ShouldApply(RewriteDriver *driver)
Definition: rewrite_driver.h:98
Inject JavaScript for detecting the below-the-fold HTML panels.
Definition: split_html_beacon_filter.h:36
static const char kSplitHtmlBeaconAddedCount[]
Counters.
Definition: split_html_beacon_filter.h:39