Page Speed Optimization Libraries  1.11.33.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends 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 
18 #include "pagespeed/kernel/base/basictypes.h"
19 #include "pagespeed/kernel/base/gtest_prod.h"
20 #include "pagespeed/kernel/base/string.h"
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
Definition: downstream_caching_directives.h:31
void ParseCapabilityListFromRequestHeaders(const RequestHeaders &request_headers)
static const char kNoCapabilitiesSpecified[]
Definition: downstream_caching_directives.h:35