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() const; | 58 bool UseGtkTheme() const; |
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) const; | 62 GdkColor GetGdkColor(int id) const; |
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() const; | 66 GdkColor GetBorderColor() const; |
67 | 67 |
| 68 // This method returns averages of the thumb part and of the track colors. |
| 69 // Used when rendering scrollbars. |
| 70 static void GetScrollbarColors(GdkColor* thumb_active_color, |
| 71 GdkColor* thumb_inactive_color, |
| 72 GdkColor* track_color, |
| 73 bool use_gtk_theme); |
| 74 |
68 // Expose the inner label. Only used for testing. | 75 // Expose the inner label. Only used for testing. |
69 GtkWidget* fake_label() { return fake_label_.get(); } | 76 GtkWidget* fake_label() { return fake_label_.get(); } |
70 | 77 |
71 // Returns a CairoCachedSurface for a particular Display. CairoCachedSurfaces | 78 // Returns a CairoCachedSurface for a particular Display. CairoCachedSurfaces |
72 // (hopefully) live on the X server, instead of the client so we don't have | 79 // (hopefully) live on the X server, instead of the client so we don't have |
73 // to send the image to the server on each expose. | 80 // to send the image to the server on each expose. |
74 CairoCachedSurface* GetSurfaceNamed(int id, GtkWidget* widget_on_display); | 81 CairoCachedSurface* GetSurfaceNamed(int id, GtkWidget* widget_on_display); |
75 | 82 |
76 // These functions do not add a ref to the returned pixbuf, and it should not
be | 83 // These functions do not add a ref to the returned pixbuf, and it should not
be |
77 // unreffed. | 84 // unreffed. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 153 |
147 // The default folder icon and default bookmark icon for the GTK theme. | 154 // The default folder icon and default bookmark icon for the GTK theme. |
148 // These are static because the system can only have one theme at a time. | 155 // These are static because the system can only have one theme at a time. |
149 // They are cached when they are requested the first time, and cleared when | 156 // They are cached when they are requested the first time, and cleared when |
150 // the system theme changes. | 157 // the system theme changes. |
151 static GdkPixbuf* default_folder_icon_; | 158 static GdkPixbuf* default_folder_icon_; |
152 static GdkPixbuf* default_bookmark_icon_; | 159 static GdkPixbuf* default_bookmark_icon_; |
153 }; | 160 }; |
154 | 161 |
155 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 162 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
OLD | NEW |