#include "request_properties.h"
|
| RequestProperties (UserAgentMatcher *matcher) |
|
void | SetUserAgent (const StringPiece &user_agent_string) |
| Sets the user agent string on the underlying DeviceProperties object.
|
|
void | ParseRequestHeaders (const RequestHeaders &request_headers) |
|
bool | SupportsImageInlining () const |
|
bool | SupportsLazyloadImages () const |
|
bool | SupportsCriticalCss () const |
|
bool | SupportsCriticalCssBeacon () const |
|
bool | SupportsCriticalImagesBeacon () const |
|
bool | SupportsJsDefer (bool enable_mobile) const |
|
bool | SupportsWebpInPlace () const |
|
bool | SupportsWebpRewrittenUrls () const |
|
bool | SupportsWebpLosslessAlpha () const |
|
bool | IsBot () const |
|
bool | SupportsSplitHtml (bool enable_mobile) const |
|
bool | CanPreloadResources () const |
|
bool | GetScreenResolution (int *width, int *height) const |
|
UserAgentMatcher::DeviceType | GetDeviceType () const |
|
bool | IsMobile () const |
|
bool | ForbidWebpInlining () const |
|
void | SetPreferredImageQualities (const std::vector< int > *webp, const std::vector< int > *jpeg) |
|
bool | GetPreferredImageQualities (DeviceProperties::ImageQualityPreference preference, int *webp, int *jpeg) const |
| Returns true iff WebP and Jpeg image quality are set for the preference.
|
|
void | LogDeviceInfo (AbstractLogRecord *log_record, bool enable_aggressive_rewriters_for_mobile) |
|
|
static int | GetPreferredImageQualityCount () |
|
This class keeps track of the request properties of the client, which are for the most part learned from the UserAgent string and specific request headers that indicate what optimizations are supported; most properties are described in device_properties.h. It relies on DeviceProperties and DownstreamCachingDirectives objects for deciding on support for a given capability.
void net_instaweb::RequestProperties::ParseRequestHeaders |
( |
const RequestHeaders & |
request_headers | ) |
|
void net_instaweb::RequestProperties::SetPreferredImageQualities |
( |
const std::vector< int > * |
webp, |
|
|
const std::vector< int > * |
jpeg |
|
) |
| |
Does not own the vectors. Callers must ensure the lifetime of vectors exceeds that of the RequestProperties.
bool net_instaweb::RequestProperties::SupportsWebpInPlace |
( |
| ) |
const |
Note that it's assumed that if the proxy cache SupportsWebp it also supports the Accept: image/webp header (since this represents a strict subset of the user agents for which SupportsWebpRewrittenUrls holds).
The documentation for this class was generated from the following file: