15 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_REQUEST_PROPERTIES_H_
16 #define NET_INSTAWEB_REWRITER_PUBLIC_REQUEST_PROPERTIES_H_
18 #include "net/instaweb/rewriter/public/device_properties.h"
23 #include "pagespeed/kernel/http/user_agent_matcher.h"
25 namespace net_instaweb {
27 class DownstreamCachingDirectives;
28 class AbstractLogRecord;
48 bool SupportsImageInlining()
const;
49 bool SupportsLazyloadImages()
const;
50 bool SupportsCriticalCss()
const;
51 bool SupportsCriticalCssBeacon()
const;
52 bool SupportsCriticalImagesBeacon()
const;
53 bool SupportsJsDefer(
bool enable_mobile)
const;
58 bool SupportsWebpRewrittenUrls()
const;
59 bool SupportsWebpLosslessAlpha()
const;
60 bool SupportsWebpAnimated()
const;
63 bool IsMobile()
const;
64 bool IsTablet()
const;
65 bool ForbidWebpInlining()
const;
66 bool AcceptsGzip()
const;
68 bool enable_aggressive_rewriters_for_mobile);
69 bool RequestsSaveData()
const;
70 bool HasViaHeader()
const;
73 friend class ImageRewriteTest;
74 FRIEND_TEST(RequestPropertiesTest, GetScreenGroupIndex);
79 mutable LazyBool supports_image_inlining_;
81 mutable LazyBool supports_lazyload_images_;
82 mutable LazyBool supports_webp_in_place_;
83 mutable LazyBool supports_webp_rewritten_urls_;
84 mutable LazyBool supports_webp_lossless_alpha_;
85 mutable LazyBool supports_webp_animated_;
bool SupportsWebpInPlace() const
Definition: user_agent_matcher.h:43
Definition: log_record.h:59
Definition: scoped_ptr.h:30
LazyBool
Lazily-initialized boolean value.
Definition: basictypes.h:68
void SetUserAgent(StringPiece user_agent_string)
Sets the user agent string on the underlying DeviceProperties object.
DeviceType
Definition: user_agent_matcher.h:49
void ParseRequestHeaders(const RequestHeaders &request_headers)
Definition: request_properties.h:37