summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/browser.cc7
-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
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc3
16 files changed, 24 insertions, 18 deletions
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index e2d117f..a60947f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -74,6 +74,8 @@
#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/tabs/tab_finder.h"
#include "chrome/browser/tabs/tab_strip_model.h"
+#include "chrome/browser/themes/theme_service.h"
+#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
@@ -241,8 +243,9 @@ Browser::Browser(Type type, Profile* profile)
NotificationService::AllSources());
registrar_.Add(this, NotificationType::EXTENSION_PROCESS_TERMINATED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ registrar_.Add(
+ this, NotificationType::BROWSER_THEME_CHANGED,
+ Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_)));
registrar_.Add(this, NotificationType::TAB_CONTENT_SETTINGS_CHANGED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
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() {
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 2f52548..f070b153 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -409,7 +409,8 @@ NewTabUI::NewTabUI(TabContents* contents)
// Listen for theme installation.
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(GetProfile())));
// Listen for bookmark bar visibility changes.
registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
NotificationService::AllSources());
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 2b093de..959295c 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -155,7 +155,8 @@ bool InDateRange(double begin, double end) {
NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) {
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
- NotificationService::AllSources());
+ Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(profile)));
registrar_.Add(this, NotificationType::PROMO_RESOURCE_STATE_CHANGED,
NotificationService::AllSources());