summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 22:03:57 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 22:03:57 +0000
commitffa6f5975ce23dbd97f9300c97b46d3c0f29605b (patch)
treeed9b5c8b6427eb37ce66165dd4a20dad359cf469 /chrome/browser/ui/gtk
parent38cc5ad9ecc757db16a5e97c2fd0e6a1713ba86c (diff)
downloadchromium_src-ffa6f5975ce23dbd97f9300c97b46d3c0f29605b.zip
chromium_src-ffa6f5975ce23dbd97f9300c97b46d3c0f29605b.tar.gz
chromium_src-ffa6f5975ce23dbd97f9300c97b46d3c0f29605b.tar.bz2
Multiprofile: Fix all places where we observe BROWSER_THEME_CHANGED so that we
observe on a specific ThemeService. BUG=87457 TEST=none Review URL: http://codereview.chromium.org/7243013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk')
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc2
-rw-r--r--chrome/browser/ui/gtk/bubble/bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/download/download_shelf_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/overflow_button.cc5
-rw-r--r--chrome/browser/ui/gtk/status_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc2
13 files changed, 15 insertions, 14 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index fd7797e..23a97ea 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -159,7 +159,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window,
UpdateFloatingState();
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
profile_->GetPrefs(), this);
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
index c2c18d7..b8dc6e9 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc
@@ -48,7 +48,7 @@ BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate,
NULL);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
index 8934d70..a41f5ae 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc
@@ -182,7 +182,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWidget* anchor,
G_CALLBACK(&OnRemoveClickedThunk), this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 88fe07a..e9ff2f8 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -403,7 +403,7 @@ void BrowserTitlebar::Init() {
theme_service_ = GtkThemeService::GetFrom(
browser_window_->browser()->profile());
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
UpdateTitleAndIcon();
}
diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
index c803033..e962568 100644
--- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
@@ -180,7 +180,7 @@ void BubbleGtk::Init(GtkWidget* anchor_widget,
}
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
}
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index c927494..44305cb 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -243,7 +243,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
}
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
theme_service_->InitThemesFor(this);
// Set the initial width of the widget to be animated.
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index 4f56282..ef8e8d0 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -143,7 +143,7 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent)
theme_service_->InitThemesFor(this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
gtk_widget_show_all(shelf_.get());
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 8e3be1a..439a815 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -301,7 +301,7 @@ void FindBarGtk::InitWidgets() {
theme_service_->InitThemesFor(this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
g_signal_connect(widget(), "parent-set", G_CALLBACK(OnParentSet), this);
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
index 949ff62..6ea160a 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc
@@ -92,7 +92,7 @@ InfoBarGtk::InfoBarGtk(TabContentsWrapper* owner, InfoBarDelegate* delegate)
this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
UpdateBorderColor();
}
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index d7432fd..062470b 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -314,7 +314,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
gtk_box_pack_end(GTK_BOX(hbox_), options_alignment, FALSE, FALSE, 0);
notification_registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
// We don't do InitThemesFor() because it just forces a redraw.
gtk_util::ActAsRoundedWindow(frame_container_, gtk_util::kGdkBlack, 3,
diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc
index d1e57bd..b37005c 100644
--- a/chrome/browser/ui/gtk/overflow_button.cc
+++ b/chrome/browser/ui/gtk/overflow_button.cc
@@ -17,9 +17,10 @@ OverflowButton::OverflowButton(Profile* profile) : profile_(profile) {
widget_.Own(GtkThemeService::GetFrom(profile)->BuildChromeButton());
gtk_widget_set_no_show_all(widget_.get(), TRUE);
+ GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
- GtkThemeService::GetFrom(profile)->InitThemesFor(this);
+ Source<ThemeService>(theme_service));
+ theme_service->InitThemesFor(this);
}
OverflowButton::~OverflowButton() {
diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc
index 059329f..de16765 100644
--- a/chrome/browser/ui/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc
@@ -50,7 +50,7 @@ StatusBubbleGtk::StatusBubbleGtk(Profile* profile)
theme_service_->InitThemesFor(this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
}
StatusBubbleGtk::~StatusBubbleGtk() {
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index a883702..1ca5784 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -707,7 +707,7 @@ TabStripGtk::TabStripGtk(TabStripModel* model, BrowserWindowGtk* window)
hover_tab_selector_(model) {
theme_service_->InitThemesFor(this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(theme_service_));
}
TabStripGtk::~TabStripGtk() {