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

Side by Side Diff: app/theme_provider.h

Issue 151153: Allow getting the theme tint as a value so that it can be applied independent... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 APP_THEME_PROVIDER_H_ 5 #ifndef APP_THEME_PROVIDER_H_
6 #define APP_THEME_PROVIDER_H_ 6 #define APP_THEME_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 10
11 #if defined(OS_LINUX) 11 #if defined(OS_LINUX)
12 #include <gdk/gdk.h> 12 #include <gdk/gdk.h>
13 #elif defined(OS_MACOSX) 13 #elif defined(OS_MACOSX)
14 #ifdef __OBJC__ 14 #ifdef __OBJC__
15 @class NSColor;
15 @class NSImage; 16 @class NSImage;
16 #else 17 #else
18 class NSColor;
17 class NSImage; 19 class NSImage;
18 #endif // __OBJC__ 20 #endif // __OBJC__
19 #endif // OS_* 21 #endif // OS_*
20 22
21 class SkBitmap; 23 class SkBitmap;
22 24
23 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
24 // 26 //
25 // ThemeProvider 27 // ThemeProvider
26 // 28 //
(...skipping 29 matching lines...) Expand all
56 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared 58 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared
57 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme 59 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme
58 // provider and should not be freed. 60 // provider and should not be freed.
59 // 61 //
60 // The bitmap is assumed to exist. This function will log in release, and 62 // The bitmap is assumed to exist. This function will log in release, and
61 // assert in debug mode if it does not. On failure, this will return a 63 // assert in debug mode if it does not. On failure, this will return a
62 // pointer to a shared empty placeholder bitmap so it will be visible what 64 // pointer to a shared empty placeholder bitmap so it will be visible what
63 // is missing. 65 // is missing.
64 virtual GdkPixbuf* GetPixbufNamed(int id) = 0; 66 virtual GdkPixbuf* GetPixbufNamed(int id) = 0;
65 #elif defined(OS_MACOSX) 67 #elif defined(OS_MACOSX)
66 // Gets the NSImage with the specified |id|. Returns a pointer to a shared 68 // Gets the NSImage with the specified |id|.
67 // instance of the NSImage. This shared NSImage is owned by the theme
68 // provider and should not be freed.
69 // 69 //
70 // The bitmap is not assumed to exist. If a theme does not provide an image, 70 // The bitmap is not assumed to exist. If a theme does not provide an image,
71 // this function will return nil. 71 // this function will return nil.
72
72 virtual NSImage* GetNSImageNamed(int id) = 0; 73 virtual NSImage* GetNSImageNamed(int id) = 0;
74 // Gets the NSColor for tinting with the specified |id|.
75 //
76 // The tint is not assumed to exist. If a theme does not provide a tint with
77 // that id, this function will return nil.
78 virtual NSColor* GetNSColorTint(int id) = 0;
73 #endif 79 #endif
74 }; 80 };
75 81
76 #endif // APP_THEME_PROVIDER_H_ 82 #endif // APP_THEME_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698