Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
meta_tag_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 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_META_TAG_FILTER_H_
23 #define NET_INSTAWEB_REWRITER_PUBLIC_META_TAG_FILTER_H_
24 
27 
28 namespace net_instaweb {
29 
30 class HtmlElement;
31 class ResponseHeaders;
32 class RewriteDriver;
33 class Statistics;
34 class Variable;
35 
39 class MetaTagFilter : public CommonFilter {
40  public:
41  explicit MetaTagFilter(RewriteDriver* rewrite_driver);
42  virtual ~MetaTagFilter();
43 
44  static void InitStats(Statistics* stats);
45 
46  virtual void StartDocumentImpl();
47  virtual void StartElementImpl(HtmlElement* element) {}
48 
56  virtual void EndElementImpl(HtmlElement* element);
57  virtual void Flush();
58 
59  virtual const char* Name() const { return "ConvertMetaTags"; }
60 
64  HtmlElement* element,
65  ResponseHeaders* response_headers);
66 
67  private:
68  ResponseHeaders* response_headers_;
69 
71  Variable* converted_meta_tag_count_;
72 
73 
74 };
75 
76 }
77 
78 #endif
Definition: common_filter.h:47
Definition: statistics.h:43
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
virtual void StartDocumentImpl()
Definition: html_element.h:42
Read/write API for HTTP response headers.
Definition: response_headers.h:37
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: meta_tag_filter.h:59
static bool ExtractAndUpdateMetaTagDetails(HtmlElement *element, ResponseHeaders *response_headers)
Definition: rewrite_driver.h:100
virtual void EndElementImpl(HtmlElement *element)
Definition: meta_tag_filter.h:39