00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018
00019 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_
00020 #define NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_
00021
00022 #include "base/basictypes.h"
00023 #include "net/instaweb/htmlparse/public/empty_html_filter.h"
00024
00025 namespace net_instaweb {
00026
00027 class RewriteDriver;
00028
00031 class BaseTagFilter : public EmptyHtmlFilter {
00032 public:
00033 explicit BaseTagFilter(RewriteDriver* driver)
00034 : added_base_tag_(false),
00035 driver_(driver) {}
00036
00037 virtual ~BaseTagFilter();
00038
00039 virtual void StartDocument() {
00040 added_base_tag_ = false;
00041 }
00042 virtual void StartElement(HtmlElement* element);
00043 virtual const char* Name() const { return "BaseTag"; }
00044
00045 private:
00046 bool added_base_tag_;
00047 RewriteDriver* driver_;
00048
00049 DISALLOW_COPY_AND_ASSIGN(BaseTagFilter);
00050 };
00051
00052 }
00053
00054 #endif ///< NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_