Page Speed Optimization Libraries  1.7.30.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Friends
net_instaweb::RequestProperties Class Reference

#include "request_properties.h"

List of all members.

Public Member Functions

 RequestProperties (UserAgentMatcher *matcher)
void set_user_agent (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 SupportsCriticalImagesBeacon () const
bool SupportsJsDefer (bool enable_mobile) const
bool SupportsWebp () 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
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 Public Member Functions

static int GetPreferredImageQualityCount ()

Friends

class ImageRewriteTest

Detailed Description

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. It relies on DeviceProperties and DownstreamCachingDirectives objects for deciding on support for a given capability.


Member Function Documentation

void net_instaweb::RequestProperties::ParseRequestHeaders ( const RequestHeaders &  request_headers)

Calls ParseCapabilityListFromRequestHeaders on the underlying DownstreamCachingDirectives object.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines