00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018
00019 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_RESOURCE_TAG_SCANNER_H_
00020 #define NET_INSTAWEB_REWRITER_PUBLIC_RESOURCE_TAG_SCANNER_H_
00021
00022 #include "net/instaweb/htmlparse/public/html_element.h"
00023 #include "net/instaweb/util/public/basictypes.h"
00024
00025 namespace net_instaweb {
00026 class HtmlParse;
00027
00028 class ResourceTagScanner {
00029 public:
00030 explicit ResourceTagScanner(HtmlParse* html_parse)
00031 : find_a_tags_(false),
00032 find_form_tags_(false) {
00033 }
00034
00045 HtmlElement::Attribute* ScanElement(HtmlElement* element,
00046 bool* is_hyperlink) const;
00047
00054 void set_find_a_tags(bool val) { find_a_tags_ = val; }
00055 void set_find_form_tags(bool val) { find_form_tags_ = val; }
00056
00057 private:
00058 bool find_a_tags_;
00059 bool find_form_tags_;
00060 DISALLOW_COPY_AND_ASSIGN(ResourceTagScanner);
00061 };
00062
00063 }
00064
00065 #endif ///< NET_INSTAWEB_REWRITER_PUBLIC_RESOURCE_TAG_SCANNER_H_