19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_SIMPLE_TEXT_FILTER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_SIMPLE_TEXT_FILTER_H_
33 namespace net_instaweb {
51 virtual bool RewriteText(
const StringPiece& url,
52 const StringPiece& in,
59 virtual const char* id()
const = 0;
60 virtual const char* name()
const = 0;
66 REFCOUNT_FRIEND_DECLARATION(
Rewriter);
84 virtual const char*
id()
const {
return rewriter_->id(); }
87 return rewriter_->OptimizationOnly();
103 virtual void EndElementImpl(
HtmlElement* element) {}
104 virtual void StartElementImpl(HtmlElement* element);
108 RewriteContext* parent,
const ResourceSlotPtr& slot);
111 virtual const char* id()
const {
return rewriter_->id(); }
112 virtual const char*
Name()
const {
return rewriter_->name(); }
118 RewriterPtr rewriter_;
RewriteContext * parent()
Allows a nested rewriter to walk up its parent hierarchy.
Definition: rewrite_context.h:280
Definition: html_element.h:66
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: simple_text_filter.h:112
virtual bool OptimizationOnly() const
Definition: simple_text_filter.h:86
virtual bool OptimizationOnly() const
See RewriteContext::OptimizationOnly()
Definition: simple_text_filter.h:63
Definition: ref_counted_ptr.h:41
Definition: output_resource_kind.h:28
Definition: simple_text_filter.h:75
Definition: html_element.h:42
Definition: simple_text_filter.h:46
virtual bool ComputeOnTheFly() const
Definition: simple_text_filter.h:113
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
virtual RewriteContext * MakeRewriteContext()
virtual OutputResourceKind kind() const
Definition: simple_text_filter.h:85
bool PolicyPermitsRendering() const override
Definition: simple_text_filter.h:89
Definition: rewrite_filter.h:35
Definition: rewrite_driver.h:100
Definition: server_context.h:99
Definition: rewrite_context.h:155
Definition: single_rewrite_context.h:36
virtual RewriteContext * MakeNestedRewriteContext(RewriteContext *parent, const ResourceSlotPtr &slot)
virtual void RewriteSingle(const ResourcePtr &input, const OutputResourcePtr &output)
Subclasses of SingleRewriteContext must override this:
Definition: simple_text_filter.h:48
virtual void StartDocumentImpl()
Definition: simple_text_filter.h:102
virtual const char * id() const
Returns the filter ID.
Definition: simple_text_filter.h:84
OutputResourceKind
Definition: output_resource_kind.h:26