Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
downstream_caching_directives.h
1 // Copyright 2013 Google Inc. All Rights Reserved.
14 
15 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_DOWNSTREAM_CACHING_DIRECTIVES_H_
16 #define NET_INSTAWEB_REWRITER_PUBLIC_DOWNSTREAM_CACHING_DIRECTIVES_H_
17 
21 
22 namespace net_instaweb {
23 
24 class RequestHeaders;
25 
32  public:
35  static const char kNoCapabilitiesSpecified[];
36 
38  virtual ~DownstreamCachingDirectives();
39 
43  const RequestHeaders& request_headers);
44 
47  bool SupportsImageInlining() const;
48  bool SupportsLazyloadImages() const;
51  bool SupportsJsDefer() const;
52  bool SupportsWebp() const;
53  bool SupportsWebpLosslessAlpha() const;
54  bool SupportsWebpAnimated() const;
55 
56  private:
71  static bool IsPropertySupported(LazyBool* supports_property,
72  const GoogleString& capability,
73  const GoogleString& capability_list);
74 
75  mutable LazyBool supports_image_inlining_;
76  mutable LazyBool supports_js_defer_;
77  mutable LazyBool supports_lazyload_images_;
78  mutable LazyBool supports_webp_;
79  mutable LazyBool supports_webp_lossless_alpha_;
80  mutable LazyBool supports_webp_animated_;
81 
82  GoogleString capabilities_to_be_supported_;
83 
84 
85 };
86 
87 }
88 
89 #endif
Read/write API for HTTP request (RequestHeaders is a misnomer).
Definition: request_headers.h:32
Definition: downstream_caching_directives.h:31
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
LazyBool
Lazily-initialized boolean value.
Definition: basictypes.h:68
void ParseCapabilityListFromRequestHeaders(const RequestHeaders &request_headers)
static const char kNoCapabilitiesSpecified[]
Definition: downstream_caching_directives.h:35