diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 22:14:17 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 22:14:17 +0000 |
commit | 62004fa05ec83543ba822fa2cb1dc4f2ba2167f5 (patch) | |
tree | 728d6d9f12f56e481677c0ac686e470332629646 /chrome | |
parent | 75439d3bd966a7df4cf8d2a17984cf35e928d181 (diff) | |
download | chromium_src-62004fa05ec83543ba822fa2cb1dc4f2ba2167f5.zip chromium_src-62004fa05ec83543ba822fa2cb1dc4f2ba2167f5.tar.gz chromium_src-62004fa05ec83543ba822fa2cb1dc4f2ba2167f5.tar.bz2 |
A small refactor of the toolbar background.
I'm not sure in what cases SetProfile will be called to change
the profile, but this seems to handle that possible case.
Review URL: http://codereview.chromium.org/159282
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.cc | 11 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.h | 3 |
2 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index b49c860..e626983 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -82,8 +82,6 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window) registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, NotificationService::AllSources()); - - InitNineBox(); } BrowserToolbarGtk::~BrowserToolbarGtk() { @@ -352,6 +350,8 @@ void BrowserToolbarGtk::SetProfile(Profile* profile) { profile_ = profile; location_bar_->SetProfile(profile); + background_ninebox_.reset(new NineBox(profile->GetThemeProvider(), + 0, IDR_THEME_TOOLBAR, 0, 0, 0, 0, 0, 0, 0)); } void BrowserToolbarGtk::UpdateTabContents(TabContents* contents, @@ -620,10 +620,3 @@ void BrowserToolbarGtk::OnPageAppMenuMoveCurrent(GtkWidget* menu, break; } } - -void BrowserToolbarGtk::InitNineBox() { - // TODO(estade): use |profile_|? - background_ninebox_.reset(new NineBox( - browser_->profile()->GetThemeProvider(), - 0, IDR_THEME_TOOLBAR, 0, 0, 0, 0, 0, 0, 0)); -} diff --git a/chrome/browser/gtk/browser_toolbar_gtk.h b/chrome/browser/gtk/browser_toolbar_gtk.h index 90f270d..ebfdc34 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/gtk/browser_toolbar_gtk.h @@ -147,9 +147,6 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, GtkMenuDirectionType dir, BrowserToolbarGtk* toolbar); - // Initialize the background NineBox. - void InitNineBox(); - // Ninebox for the toolbar background scoped_ptr<NineBox> background_ninebox_; |