20 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_RESPONSIVE_IMAGE_FILTER_H_
21 #define NET_INSTAWEB_REWRITER_PUBLIC_RESPONSIVE_IMAGE_FILTER_H_
34 namespace net_instaweb {
38 : element(element_arg), resolution(resolution_arg) {}
44 typedef std::vector<ResponsiveImageCandidate> ResponsiveImageCandidateVector;
62 typedef std::map<HtmlElement*, ResponsiveVirtualImages>
63 ResponsiveImageCandidateMap;
76 static const char kNonInlinableVirtualImage[];
77 static const char kInlinableVirtualImage[];
78 static const char kFullsizedVirtualImage[];
83 virtual void StartElementImpl(
HtmlElement* element) {}
87 virtual const char*
Name()
const {
return "ResponsiveImageFirst"; }
93 int orig_width,
int orig_height, StringPiece responsive_attribute_value,
98 std::vector<double> densities_;
99 ResponsiveImageCandidateMap candidate_map_;
110 virtual void StartElementImpl(
HtmlElement* element) {}
115 virtual const char*
Name()
const {
return "ResponsiveImageSecond"; }
126 void InsertPlaceholderDebugComment(
132 bool zoom_filter_enabled_;
Definition: common_filter.h:47
Definition: html_element.h:66
Definition: responsive_image_filter.h:104
virtual void StartDocumentImpl()
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: responsive_image_filter.h:87
ResponsiveImageCandidateVector non_inlinable_candidates
Definition: responsive_image_filter.h:54
Definition: html_element.h:42
Definition: responsive_image_filter.h:48
ResponsiveImageCandidate inlinable_candidate
Definition: responsive_image_filter.h:57
static const char kOriginalImage[]
Labels for different images used by Responsive image filters.
Definition: responsive_image_filter.h:75
virtual const char * Name() const
The name of this filter – used for logging and debugging.
Definition: responsive_image_filter.h:115
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
ResponsiveImageCandidate fullsized_candidate
Definition: responsive_image_filter.h:60
ScriptUsage
Describes a filter's relationship with scripts.
Definition: html_filter.h:38
ScriptUsage GetScriptUsage() const override
Definition: responsive_image_filter.h:119
Definition: rewrite_driver.h:100
Definition: responsive_image_filter.h:36
Definition: html_filter.h:49
virtual void StartDocumentImpl()
virtual void EndDocument()
Definition: responsive_image_filter.h:72