Page Speed Optimization Libraries
1.11.33.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
net
instaweb
rewriter
public
css_image_rewriter.h
Go to the documentation of this file.
1
/*
2
* Copyright 2011 Google Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http:///www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
18
19
#ifndef NET_INSTAWEB_REWRITER_PUBLIC_CSS_IMAGE_REWRITER_H_
20
#define NET_INSTAWEB_REWRITER_PUBLIC_CSS_IMAGE_REWRITER_H_
21
22
#include <cstddef>
23
24
#include "
net/instaweb/rewriter/public/css_filter.h
"
25
#include "
net/instaweb/rewriter/public/css_hierarchy.h
"
26
#include "
net/instaweb/rewriter/public/resource_slot.h
"
27
#include "
net/instaweb/rewriter/public/rewrite_context.h
"
28
#include "
net/instaweb/rewriter/public/rewrite_driver.h
"
29
#include "pagespeed/kernel/base/basictypes.h"
30
#include "pagespeed/kernel/http/google_url.h"
31
32
namespace
Css {
33
34
class
Values;
35
36
}
37
38
namespace
net_instaweb {
39
40
class
CacheExtender;
41
class
ImageCombineFilter;
42
class
ImageRewriteFilter;
43
class
MessageHandler;
44
class
Statistics;
45
46
class
CssImageRewriter
{
47
public
:
48
CssImageRewriter
(
CssFilter::Context
* root_context,
49
CssFilter
* filter,
50
CacheExtender
* cache_extender,
51
ImageRewriteFilter
* image_rewriter,
52
ImageCombineFilter
* image_combiner);
53
~
CssImageRewriter
();
54
55
static
void
InitStats(Statistics* statistics);
56
61
bool
RewriteCss
(int64 image_inline_max_bytes,
62
RewriteContext
* parent,
63
CssHierarchy
* hierarchy,
64
MessageHandler* handler);
65
67
bool
FlatteningEnabled
()
const
;
68
70
bool
RewritesEnabled
(int64 image_inline_max_bytes)
const
;
71
74
void
RewriteSlot
(
const
ResourceSlotPtr& slot,
75
int64 image_inline_max_bytes,
76
RewriteContext
* parent);
77
80
static
void
InheritChildImageInfo
(
RewriteContext
* context);
81
82
private
:
83
RewriteDriver
* driver()
const
{
84
return
filter_->driver();
85
}
86
bool
RewriteImport(
RewriteContext
* parent,
CssHierarchy
* hierarchy,
87
bool
* is_authorized);
88
bool
RewriteImage(int64 image_inline_max_bytes,
const
GoogleUrl& trim_url,
89
const
GoogleUrl& original_url,
RewriteContext
* parent,
90
Css::Values* values,
size_t
value_index,
91
bool
* is_authorized);
92
94
CssFilter
* filter_;
95
97
CssFilter::Context
* root_context_;
98
102
CacheExtender
* cache_extender_;
103
ImageCombineFilter
* image_combiner_;
104
ImageRewriteFilter
* image_rewriter_;
105
106
107
};
108
109
}
110
111
#endif
net_instaweb::CssFilter::Context
Context used by CssFilter under async flow.
Definition:
css_filter.h:255
net_instaweb::CssImageRewriter::RewriteCss
bool RewriteCss(int64 image_inline_max_bytes, RewriteContext *parent, CssHierarchy *hierarchy, MessageHandler *handler)
net_instaweb::CssHierarchy
Definition:
css_hierarchy.h:64
css_filter.h
rewrite_driver.h
net_instaweb::CssImageRewriter::RewriteSlot
void RewriteSlot(const ResourceSlotPtr &slot, int64 image_inline_max_bytes, RewriteContext *parent)
net_instaweb::CssImageRewriter::RewritesEnabled
bool RewritesEnabled(int64 image_inline_max_bytes) const
Are any rewrites enabled?
resource_slot.h
net_instaweb::RewriteDriver
Definition:
rewrite_driver.h:98
net_instaweb::RewriteContext
Definition:
rewrite_context.h:146
net_instaweb::ImageRewriteFilter
Definition:
image_rewrite_filter.h:62
css_hierarchy.h
net_instaweb::CssImageRewriter
Definition:
css_image_rewriter.h:46
net_instaweb::ImageCombineFilter
Definition:
image_combine_filter.h:58
net_instaweb::CssImageRewriter::InheritChildImageInfo
static void InheritChildImageInfo(RewriteContext *context)
rewrite_context.h
net_instaweb::CacheExtender
Definition:
cache_extender.h:49
net_instaweb::CssFilter
Definition:
css_filter.h:74
net_instaweb::CssImageRewriter::FlatteningEnabled
bool FlatteningEnabled() const
Is flattening enabled?
Generated on Fri May 13 2016 15:33:58 for Page Speed Optimization Libraries by
1.8.6