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_UI_GTK_GTK_THEME_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 GdkColor BuildAndSetFrameColor(const GdkColor* base, | 189 GdkColor BuildAndSetFrameColor(const GdkColor* base, |
190 const GdkColor* gtk_base, | 190 const GdkColor* gtk_base, |
191 const color_utils::HSL& tint, | 191 const color_utils::HSL& tint, |
192 int color_id, | 192 int color_id, |
193 int tint_id); | 193 int tint_id); |
194 | 194 |
195 // Frees all the created GtkIconSets we use for the chrome menu. | 195 // Frees all the created GtkIconSets we use for the chrome menu. |
196 void FreeIconSets(); | 196 void FreeIconSets(); |
197 | 197 |
198 // Lazily generates each bitmap used in the gtk theme. | 198 // Lazily generates each bitmap used in the gtk theme. |
199 SkBitmap* GenerateGtkThemeBitmap(int id) const; | 199 SkBitmap GenerateGtkThemeBitmap(int id) const; |
200 | 200 |
201 // Creates a GTK+ version of IDR_THEME_FRAME. Instead of tinting, this | 201 // Creates a GTK+ version of IDR_THEME_FRAME. Instead of tinting, this |
202 // creates a theme configurable gradient ending with |color_id| at the | 202 // creates a theme configurable gradient ending with |color_id| at the |
203 // bottom, and |gradient_name| at the top if that color is specified in the | 203 // bottom, and |gradient_name| at the top if that color is specified in the |
204 // theme. | 204 // theme. |
205 SkBitmap* GenerateFrameImage(int color_id, | 205 SkBitmap GenerateFrameImage(int color_id, |
206 const char* gradient_name) const; | 206 const char* gradient_name) const; |
207 | 207 |
208 // Takes the base frame image |base_id| and tints it with |tint_id|. | 208 // Takes the base frame image |base_id| and tints it with |tint_id|. |
209 SkBitmap* GenerateTabImage(int base_id) const; | 209 SkBitmap GenerateTabImage(int base_id) const; |
210 | 210 |
211 // Tints an icon based on tint. | 211 // Tints an icon based on tint. |
212 SkBitmap* GenerateTintedIcon(int base_id, | 212 SkBitmap GenerateTintedIcon(int base_id, |
213 const color_utils::HSL& tint) const; | 213 const color_utils::HSL& tint) const; |
214 | 214 |
215 // Returns the tint for buttons that contrasts with the normal window | 215 // Returns the tint for buttons that contrasts with the normal window |
216 // background color. | 216 // background color. |
217 void GetNormalButtonTintHSL(color_utils::HSL* tint) const; | 217 void GetNormalButtonTintHSL(color_utils::HSL* tint) const; |
218 | 218 |
219 // Returns a tint that's the color of the current normal text in an entry. | 219 // Returns a tint that's the color of the current normal text in an entry. |
220 void GetNormalEntryForegroundHSL(color_utils::HSL* tint) const; | 220 void GetNormalEntryForegroundHSL(color_utils::HSL* tint) const; |
221 | 221 |
222 // Returns a tint that's the color of the current highlighted text in an | 222 // Returns a tint that's the color of the current highlighted text in an |
223 // entry. | 223 // entry. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 // The default folder icon and default bookmark icon for the GTK theme. | 295 // The default folder icon and default bookmark icon for the GTK theme. |
296 // These are static because the system can only have one theme at a time. | 296 // These are static because the system can only have one theme at a time. |
297 // They are cached when they are requested the first time, and cleared when | 297 // They are cached when they are requested the first time, and cleared when |
298 // the system theme changes. | 298 // the system theme changes. |
299 static gfx::Image* default_folder_icon_; | 299 static gfx::Image* default_folder_icon_; |
300 static gfx::Image* default_bookmark_icon_; | 300 static gfx::Image* default_bookmark_icon_; |
301 }; | 301 }; |
302 | 302 |
303 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 303 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
OLD | NEW |