Index: chrome/browser/gtk/gtk_theme_provider.h |
diff --git a/chrome/browser/gtk/gtk_theme_provider.h b/chrome/browser/gtk/gtk_theme_provider.h |
index 44fed998b2005e9756de0dfb2e32951a24348355..87e3fe2e17aa2db787c9f9413880a5cdd33c9976 100644 |
--- a/chrome/browser/gtk/gtk_theme_provider.h |
+++ b/chrome/browser/gtk/gtk_theme_provider.h |
@@ -72,8 +72,7 @@ class GtkThemeProvider : public BrowserThemeProvider, |
// Used when rendering scrollbars. |
static void GetScrollbarColors(GdkColor* thumb_active_color, |
GdkColor* thumb_inactive_color, |
- GdkColor* track_color, |
- bool use_gtk_theme); |
+ GdkColor* track_color); |
// Expose the inner label. Only used for testing. |
GtkWidget* fake_label() { return fake_label_.get(); } |
@@ -83,9 +82,16 @@ class GtkThemeProvider : public BrowserThemeProvider, |
// to send the image to the server on each expose. |
CairoCachedSurface* GetSurfaceNamed(int id, GtkWidget* widget_on_display); |
- // These functions do not add a ref to the returned pixbuf, and it should not be |
- // unreffed. |
- // If |native| is true, get the GTK_STOCK version of the icon. |
+ // Returns colors that we pass to webkit to match the system theme. |
+ const SkColor& get_focus_ring_color() const { return focus_ring_color_; } |
+ const SkColor& get_thumb_active_color() const { return thumb_active_color_; } |
+ const SkColor& get_thumb_inactive_color() const { |
+ return thumb_inactive_color_; |
+ } |
+ const SkColor& get_track_color() const { return track_color_; } |
+ |
+ // These functions do not add a ref to the returned pixbuf, and it should not |
+ // be unreffed. If |native| is true, get the GTK_STOCK version of the icon. |
static GdkPixbuf* GetFolderIcon(bool native); |
static GdkPixbuf* GetDefaultFavicon(bool native); |
@@ -108,8 +114,13 @@ class GtkThemeProvider : public BrowserThemeProvider, |
GtkStyle* previous_style, |
GtkThemeProvider* provider); |
+ // Extracts colors and tints from the GTK theme, both for the |
+ // BrowserThemeProvider interface and the colors we send to webkit. |
void LoadGtkValues(); |
+ // Sets the values that we send to webkit to safe defaults. |
+ void LoadDefaultValues(); |
+ |
// Sets the underlying theme colors/tints from a GTK color. |
void SetThemeColorFromGtk(int id, GdkColor* color); |
void SetThemeTintFromGtk(int id, GdkColor* color); |
@@ -154,6 +165,13 @@ class GtkThemeProvider : public BrowserThemeProvider, |
ColorMap colors_; |
TintMap tints_; |
+ // Colors that we pass to WebKit. These are generated each time the theme |
+ // changes. |
+ SkColor focus_ring_color_; |
+ SkColor thumb_active_color_; |
+ SkColor thumb_inactive_color_; |
+ SkColor track_color_; |
+ |
// Image cache of lazily created images, created when requested by |
// GetBitmapNamed(). |
mutable ImageCache gtk_images_; |