OLD | NEW |
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 CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
6 #define CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 6 #define CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 bool UseGtkTheme(); | 58 bool UseGtkTheme(); |
59 | 59 |
60 // A wrapper around ThemeProvider::GetColor, transforming the result to a | 60 // A wrapper around ThemeProvider::GetColor, transforming the result to a |
61 // GdkColor. | 61 // GdkColor. |
62 GdkColor GetGdkColor(int id); | 62 GdkColor GetGdkColor(int id); |
63 | 63 |
64 // A weighted average between the text color and the background color of a | 64 // A weighted average between the text color and the background color of a |
65 // label. Used for borders between GTK stuff and the webcontent. | 65 // label. Used for borders between GTK stuff and the webcontent. |
66 GdkColor GetBorderColor(); | 66 GdkColor GetBorderColor(); |
67 | 67 |
68 // Expose the inner widgets. Only used for testing. | 68 // Expose the inner label. Only used for testing. |
69 GtkWidget* fake_window() { return fake_window_; } | |
70 GtkWidget* fake_label() { return fake_label_.get(); } | 69 GtkWidget* fake_label() { return fake_label_.get(); } |
71 | 70 |
72 // Returns a CairoCachedSurface for a particular Display. CairoCachedSurfaces | 71 // Returns a CairoCachedSurface for a particular Display. CairoCachedSurfaces |
73 // (hopefully) live on the X server, instead of the client so we don't have | 72 // (hopefully) live on the X server, instead of the client so we don't have |
74 // to send the image to the server on each expose. | 73 // to send the image to the server on each expose. |
75 CairoCachedSurface* GetSurfaceNamed(int id, GtkWidget* widget_on_display); | 74 CairoCachedSurface* GetSurfaceNamed(int id, GtkWidget* widget_on_display); |
76 | 75 |
77 // These functions do not add a ref to the returned pixbuf, and it should not
be | 76 // These functions do not add a ref to the returned pixbuf, and it should not
be |
78 // unreffed. | 77 // unreffed. |
79 // If |native| is true, get the GTK_STOCK version of the icon. | 78 // If |native| is true, get the GTK_STOCK version of the icon. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 146 |
148 // The default folder icon and default bookmark icon for the GTK theme. | 147 // The default folder icon and default bookmark icon for the GTK theme. |
149 // These are static because the system can only have one theme at a time. | 148 // These are static because the system can only have one theme at a time. |
150 // They are cached when they are requested the first time, and cleared when | 149 // They are cached when they are requested the first time, and cleared when |
151 // the system theme changes. | 150 // the system theme changes. |
152 static GdkPixbuf* default_folder_icon_; | 151 static GdkPixbuf* default_folder_icon_; |
153 static GdkPixbuf* default_bookmark_icon_; | 152 static GdkPixbuf* default_bookmark_icon_; |
154 }; | 153 }; |
155 | 154 |
156 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 155 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
OLD | NEW |