OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // This method returns the colors webkit will use for the scrollbars. When no | 110 // This method returns the colors webkit will use for the scrollbars. When no |
111 // colors are specified by the GTK+ theme, this function averages of the | 111 // colors are specified by the GTK+ theme, this function averages of the |
112 // thumb part and of the track colors. | 112 // thumb part and of the track colors. |
113 void GetScrollbarColors(GdkColor* thumb_active_color, | 113 void GetScrollbarColors(GdkColor* thumb_active_color, |
114 GdkColor* thumb_inactive_color, | 114 GdkColor* thumb_inactive_color, |
115 GdkColor* track_color); | 115 GdkColor* track_color); |
116 | 116 |
117 // Expose the inner label. Only used for testing. | 117 // Expose the inner label. Only used for testing. |
118 GtkWidget* fake_label() { return fake_label_.get(); } | 118 GtkWidget* fake_label() { return fake_label_.get(); } |
119 | 119 |
120 // Same as above, but auto-mirrors the underlying pixbuf in RTL mode. | |
121 gfx::CairoCachedSurface* GetRTLEnabledSurfaceNamed( | |
122 int id, GtkWidget* widget_on_display); | |
123 | |
124 // A way to get a cached cairo surface for the equivalent of GetFolderIcon() | 120 // A way to get a cached cairo surface for the equivalent of GetFolderIcon() |
125 // or GetDefaultFavicon(). Uses the ids defined in CairoDefaultIcon. | 121 // or GetDefaultFavicon(). Uses the ids defined in CairoDefaultIcon. |
126 gfx::CairoCachedSurface* GetCairoIcon(int id, GtkWidget* widget_on_display); | 122 gfx::CairoCachedSurface* GetCairoIcon(int id, GtkWidget* widget_on_display); |
127 | 123 |
128 // Returns colors that we pass to webkit to match the system theme. | 124 // Returns colors that we pass to webkit to match the system theme. |
129 const SkColor& get_focus_ring_color() const { return focus_ring_color_; } | 125 const SkColor& get_focus_ring_color() const { return focus_ring_color_; } |
130 const SkColor& get_thumb_active_color() const { return thumb_active_color_; } | 126 const SkColor& get_thumb_active_color() const { return thumb_active_color_; } |
131 const SkColor& get_thumb_inactive_color() const { | 127 const SkColor& get_thumb_inactive_color() const { |
132 return thumb_inactive_color_; | 128 return thumb_inactive_color_; |
133 } | 129 } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 330 |
335 // The default folder icon and default bookmark icon for the GTK theme. | 331 // The default folder icon and default bookmark icon for the GTK theme. |
336 // These are static because the system can only have one theme at a time. | 332 // These are static because the system can only have one theme at a time. |
337 // They are cached when they are requested the first time, and cleared when | 333 // They are cached when they are requested the first time, and cleared when |
338 // the system theme changes. | 334 // the system theme changes. |
339 static GdkPixbuf* default_folder_icon_; | 335 static GdkPixbuf* default_folder_icon_; |
340 static GdkPixbuf* default_bookmark_icon_; | 336 static GdkPixbuf* default_bookmark_icon_; |
341 }; | 337 }; |
342 | 338 |
343 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 339 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
OLD | NEW |