Page Speed Optimization Libraries
1.13.35.1
|
Public Types | |
enum | Type { kHtml, kXhtml, kCeHtml, kJavascript, kCss, kText, kXml, kPng, kGif, kJpeg, kSwf, kWebp, kIco, kJson, kSourceMap, kPdf, kVideo, kAudio, kOctetStream, kOther } |
The MIME types we process. More... | |
Public Member Functions | |
const char * | mime_type () const |
const char * | file_extension () const |
Type | type () const |
bool | IsCss () const |
Return true iff this content type is CSS. | |
bool | IsJsLike () const |
Return true iff this content type is JS, or something similar like JSON. | |
bool | IsHtmlLike () const |
bool | IsXmlLike () const |
bool | IsFlash () const |
Return true iff this content type is Flash. | |
bool | IsImage () const |
Return true iff this content type is Image. | |
bool | IsVideo () const |
Return true iff this content type is Video. | |
bool | IsAudio () const |
Return true iff this content type is Audio. | |
bool | IsLikelyStaticResource () const |
Heuristic to determine whether this should be treated as a static resource. | |
bool | IsCompressible () const |
Heuristic to determine whether compressing the resource is beneficial. | |
Static Public Member Functions | |
static int | MaxProducedExtensionLength () |
Public Attributes | |
const char * | mime_type_ |
const char * | file_extension_ |
includes ".", e.g. ".ext" | |
Type | type_ |
The MIME types we process.
Enumerator | |
---|---|
kCeHtml | |
kOctetStream |
Binary resources. |
kOther |
Used to specify a new local ContentType in one test file. |
|
inline |
bool net_instaweb::ContentType::IsHtmlLike | ( | ) | const |
Return true iff this content type is HTML, or XHTML, or some other such thing (e.g. CE-HTML) that we can rewrite.
bool net_instaweb::ContentType::IsXmlLike | ( | ) | const |
Return true iff this content type is XML of some kind (either XHTML or some other XML).
|
static |
Returns the maximum extension length of any resource types our filters can create. Does not count the ".". See RewriteDriver::CreateOutputResourceWithPath()
const char* net_instaweb::ContentType::mime_type_ |
These fields should be private; we leave them public only so we can use struct literals in content_type.cc. Other code should use the above accessor methods instead of accessing these fields directly.