diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:23:08 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:23:08 +0000 |
commit | 5fdafb2f68bd61ef92d10194402348d1e5839015 (patch) | |
tree | fb8583216c733e2a2218501646cf8c72fec35bb1 /chrome/browser/gtk/browser_toolbar_gtk.h | |
parent | 0735266658f996210b6f43142ce7f4c55f47ae13 (diff) | |
download | chromium_src-5fdafb2f68bd61ef92d10194402348d1e5839015.zip chromium_src-5fdafb2f68bd61ef92d10194402348d1e5839015.tar.gz chromium_src-5fdafb2f68bd61ef92d10194402348d1e5839015.tar.bz2 |
GTK Themes: Refactored to use notifications instead of manual plumbing.
- Removes large amounts of plumbing because:
- All GtkChromeButtons are constructed from GtkThemeProvider which keeps a reference to all live buttons and sends them theme change notifications.
- CustomDrawButtons now subscribe themselves to the BROWSER_THEME_CHANGED notification; this gets rid of a LOT of plubming.
- Removes the GtkThemeProperties struct; just pass the theme provider around.
- Move all the constants from the themes namespace to class statics, per tony's suggestion
Review URL: http://codereview.chromium.org/149547
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_toolbar_gtk.h')
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.h b/chrome/browser/gtk/browser_toolbar_gtk.h index fefb000..9aeee9a 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/gtk/browser_toolbar_gtk.h @@ -18,6 +18,7 @@ class BackForwardButtonGtk; class Browser; class BrowserWindowGtk; class CustomDrawButton; +class GtkThemeProvider; class GoButtonGtk; class LocationBar; class LocationBarViewGtk; @@ -78,9 +79,6 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, ToolbarStarToggleGtk* star() { return star_.get(); } - // Alerts us that the theme changed, and we might need to change theme images. - void UserChangedTheme(); - // Implement AutocompletePopupPositioner, return the position of where the // Omnibox results popup should go (from the star to the go buttons). virtual gfx::Rect GetPopupBounds() const; @@ -179,6 +177,8 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, // The model that contains the security level, text, icon to display... ToolbarModel* model_; + GtkThemeProvider* theme_provider_; + scoped_ptr<MenuGtk> page_menu_; scoped_ptr<MenuGtk> app_menu_; |