19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_CSS_TAG_SCANNER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_CSS_TAG_SCANNER_H_
22 #include "pagespeed/kernel/base/basictypes.h"
23 #include "pagespeed/kernel/base/string.h"
24 #include "pagespeed/kernel/base/string_util.h"
25 #include "pagespeed/kernel/html/html_element.h"
26 #include "pagespeed/kernel/http/google_url.h"
28 namespace net_instaweb {
43 enum TransformStatus { kSuccess, kNoChange, kFailure };
50 virtual TransformStatus
Transform(GoogleString* str) = 0;
53 static const char kStylesheet[];
54 static const char kAlternate[];
55 static const char kUriValue[];
69 HtmlElement::Attribute** href,
71 StringPieceVector* nonstandard_attributes);
76 HtmlElement::Attribute** href,
87 kInputDoesNotIncludeEnd
95 StringPiece contents, Writer* writer, Transformer* transformer,
96 MessageHandler* handler);
104 StringPiece contents,
InputPortion input_portion, Writer* writer);
112 static bool HasImport(
const StringPiece& contents, MessageHandler* handler);
115 static bool HasUrl(
const StringPiece& contents);
131 void SerializeUrlUse(UrlKind kind,
const GoogleString& url,
132 bool is_quoted,
bool have_term_quote,
char quote,
133 bool have_term_paren,
134 Writer* writer,
bool* ok);
136 Transformer* transformer_;
137 MessageHandler* handler_;
138 GoogleString reparse_;
150 const GoogleUrl* new_base_url,
153 MessageHandler* handler);
156 virtual TransformStatus
Transform(GoogleString* str);
158 void set_trim_urls(
bool x) { trim_urls_ = x; }
161 const GoogleUrl* old_base_url_;
162 const GoogleUrl* new_base_url_;
166 MessageHandler* handler_;
Definition: css_tag_scanner.h:147
virtual TransformStatus Transform(GoogleString *str)
Definition: server_context.h:100
Definition: rewrite_options.h:84