OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ | 5 #ifndef CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ |
6 #define CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ | 6 #define CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 // Crops images down to a size such that most of the cropped image will be | 159 // Crops images down to a size such that most of the cropped image will be |
160 // displayed in the UI. Cropping is useful because images from custom themes | 160 // displayed in the UI. Cropping is useful because images from custom themes |
161 // can be of any size. Source and destination is |images|. | 161 // can be of any size. Source and destination is |images|. |
162 void CropImages(ImageCache* images) const; | 162 void CropImages(ImageCache* images) const; |
163 | 163 |
164 // Creates tinted and composited frame images. Source and destination is | 164 // Creates tinted and composited frame images. Source and destination is |
165 // |images|. | 165 // |images|. |
166 void CreateFrameImages(ImageCache* images) const; | 166 void CreateFrameImages(ImageCache* images) const; |
167 | 167 |
168 // Creates button images tinted with |button_tint| and places them in | |
169 // processed_images. | |
170 void CreateTintedButtons(const color_utils::HSL& button_tint, | |
171 ImageCache* processed_images) const; | |
172 | |
173 // Creates the semi-transparent tab background images, putting the results | 168 // Creates the semi-transparent tab background images, putting the results |
174 // in |images|. Must be called after GenerateFrameImages(). | 169 // in |images|. Must be called after GenerateFrameImages(). |
175 void CreateTabBackgroundImages(ImageCache* images) const; | 170 void CreateTabBackgroundImages(ImageCache* images) const; |
176 | 171 |
177 // Takes all the SkBitmaps in |images|, encodes them as PNGs and places | 172 // Takes all the SkBitmaps in |images|, encodes them as PNGs and places |
178 // them in |reencoded_images|. | 173 // them in |reencoded_images|. |
179 void RepackImages(const ImageCache& images, | 174 void RepackImages(const ImageCache& images, |
180 RawImages* reencoded_images) const; | 175 RawImages* reencoded_images) const; |
181 | 176 |
182 // Takes all images in |source| and puts them in |destination|, freeing any | 177 // Takes all images in |source| and puts them in |destination|, freeing any |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // Cache of images created in BuildFromExtension(). Once the theme pack is | 265 // Cache of images created in BuildFromExtension(). Once the theme pack is |
271 // created, this cache should only be accessed on the file thread. There | 266 // created, this cache should only be accessed on the file thread. There |
272 // should be no IDs in |image_memory_| that are in |images_on_file_thread_| | 267 // should be no IDs in |image_memory_| that are in |images_on_file_thread_| |
273 // or vice versa. | 268 // or vice versa. |
274 ImageCache images_on_file_thread_; | 269 ImageCache images_on_file_thread_; |
275 | 270 |
276 DISALLOW_COPY_AND_ASSIGN(BrowserThemePack); | 271 DISALLOW_COPY_AND_ASSIGN(BrowserThemePack); |
277 }; | 272 }; |
278 | 273 |
279 #endif // CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ | 274 #endif // CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_ |
OLD | NEW |