Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.h

Issue 10378009: Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 GdkColor BuildAndSetFrameColor(const GdkColor* base, 188 GdkColor BuildAndSetFrameColor(const GdkColor* base,
189 const GdkColor* gtk_base, 189 const GdkColor* gtk_base,
190 const color_utils::HSL& tint, 190 const color_utils::HSL& tint,
191 int color_id, 191 int color_id,
192 int tint_id); 192 int tint_id);
193 193
194 // Frees all the created GtkIconSets we use for the chrome menu. 194 // Frees all the created GtkIconSets we use for the chrome menu.
195 void FreeIconSets(); 195 void FreeIconSets();
196 196
197 // Lazily generates each bitmap used in the gtk theme. 197 // Lazily generates each bitmap used in the gtk theme.
198 SkBitmap* GenerateGtkThemeBitmap(int id) const; 198 SkBitmap GenerateGtkThemeBitmap(int id) const;
199 199
200 // Creates a GTK+ version of IDR_THEME_FRAME. Instead of tinting, this 200 // Creates a GTK+ version of IDR_THEME_FRAME. Instead of tinting, this
201 // creates a theme configurable gradient ending with |color_id| at the 201 // creates a theme configurable gradient ending with |color_id| at the
202 // bottom, and |gradient_name| at the top if that color is specified in the 202 // bottom, and |gradient_name| at the top if that color is specified in the
203 // theme. 203 // theme.
204 SkBitmap* GenerateFrameImage(int color_id, 204 SkBitmap GenerateFrameImage(int color_id,
205 const char* gradient_name) const; 205 const char* gradient_name) const;
206 206
207 // Takes the base frame image |base_id| and tints it with |tint_id|. 207 // Takes the base frame image |base_id| and tints it with |tint_id|.
208 SkBitmap* GenerateTabImage(int base_id) const; 208 SkBitmap GenerateTabImage(int base_id) const;
209 209
210 // Tints an icon based on tint. 210 // Tints an icon based on tint.
211 SkBitmap* GenerateTintedIcon(int base_id, 211 SkBitmap GenerateTintedIcon(int base_id,
212 const color_utils::HSL& tint) const; 212 const color_utils::HSL& tint) const;
213 213
214 // Returns the tint for buttons that contrasts with the normal window 214 // Returns the tint for buttons that contrasts with the normal window
215 // background color. 215 // background color.
216 void GetNormalButtonTintHSL(color_utils::HSL* tint) const; 216 void GetNormalButtonTintHSL(color_utils::HSL* tint) const;
217 217
218 // Returns a tint that's the color of the current normal text in an entry. 218 // Returns a tint that's the color of the current normal text in an entry.
219 void GetNormalEntryForegroundHSL(color_utils::HSL* tint) const; 219 void GetNormalEntryForegroundHSL(color_utils::HSL* tint) const;
220 220
221 // Returns a tint that's the color of the current highlighted text in an 221 // Returns a tint that's the color of the current highlighted text in an
222 // entry. 222 // entry.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 // The default folder icon and default bookmark icon for the GTK theme. 294 // The default folder icon and default bookmark icon for the GTK theme.
295 // These are static because the system can only have one theme at a time. 295 // These are static because the system can only have one theme at a time.
296 // They are cached when they are requested the first time, and cleared when 296 // They are cached when they are requested the first time, and cleared when
297 // the system theme changes. 297 // the system theme changes.
298 static gfx::Image* default_folder_icon_; 298 static gfx::Image* default_folder_icon_;
299 static gfx::Image* default_bookmark_icon_; 299 static gfx::Image* default_bookmark_icon_;
300 }; 300 };
301 301
302 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ 302 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698