diff options
Diffstat (limited to 'chrome/browser/ui/gtk')
66 files changed, 408 insertions, 396 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc index f03aed3..625975c 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc @@ -158,7 +158,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window, BookmarkBar::DONT_ANIMATE_STATE_CHANGE); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled, profile->GetPrefs(), this); @@ -954,8 +954,8 @@ void BookmarkBarGtk::BookmarkNodeChildrenReordered(BookmarkModel* model, } void BookmarkBarGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { if (model_ && model_->IsLoaded()) { // Regenerate the bookmark bar with all new objects with their theme diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h index 4bb10f4..5469cb9 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h @@ -21,8 +21,8 @@ #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h" #include "chrome/browser/ui/gtk/menu_bar_helper.h" #include "chrome/browser/ui/gtk/view_id_util.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/animation/animation.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/slide_animation.h" @@ -44,7 +44,7 @@ class BookmarkBarGtk : public ui::AnimationDelegate, public ProfileSyncServiceObserver, public BookmarkModelObserver, public MenuBarHelper::Delegate, - public NotificationObserver, + public content::NotificationObserver, public BookmarkBarInstructionsGtk::Delegate, public BookmarkContextMenuControllerDelegate { public: @@ -233,10 +233,10 @@ class BookmarkBarGtk : public ui::AnimationDelegate, virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, const BookmarkNode* node) OVERRIDE; - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); GtkWidget* CreateBookmarkButton(const BookmarkNode* node); GtkToolItem* CreateBookmarkToolItem(const BookmarkNode* node); @@ -395,7 +395,7 @@ class BookmarkBarGtk : public ui::AnimationDelegate, // need to respond to. int last_allocation_width_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The size of the tab contents last time we forced a paint. We keep track // of this so we don't force too many paints. 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 fc070ec..395f929b 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc @@ -49,13 +49,14 @@ BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate, NULL); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); } -void BookmarkBarInstructionsGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BookmarkBarInstructionsGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) UpdateColors(); } diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h index 07cddc8..44d2d6e 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h @@ -7,15 +7,15 @@ #pragma once #include "base/basictypes.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" typedef struct _GtkWidget GtkWidget; class GtkThemeService; class Profile; -class BookmarkBarInstructionsGtk : public NotificationObserver { +class BookmarkBarInstructionsGtk : public content::NotificationObserver { public: // The delegate is notified once the user clicks on the link to import // bookmarks. @@ -33,10 +33,10 @@ class BookmarkBarInstructionsGtk : public NotificationObserver { GtkWidget* widget() const { return instructions_hbox_; } private: - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); CHROMEGTK_CALLBACK_0(BookmarkBarInstructionsGtk, void, OnButtonClick); @@ -54,7 +54,7 @@ class BookmarkBarInstructionsGtk : public NotificationObserver { GtkWidget* instructions_label_; GtkWidget* instructions_link_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(BookmarkBarInstructionsGtk); }; diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc index 558efef..3a148a8 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc @@ -61,13 +61,13 @@ void BookmarkBubbleGtk::BubbleClosing(BubbleGtk* bubble, NotificationService::current()->Notify( chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN, - Source<Profile>(profile_->GetOriginalProfile()), + content::Source<Profile>(profile_->GetOriginalProfile()), NotificationService::NoDetails()); } void BookmarkBubbleGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED); if (theme_service_->UsingNativeTheme()) { @@ -190,7 +190,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWidget* anchor, G_CALLBACK(&OnRemoveClickedThunk), this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); } diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h index 247fcdb..7d9cf53 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h @@ -22,8 +22,8 @@ #include "base/memory/weak_ptr.h" #include "base/task.h" #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" #include "ui/base/gtk/gtk_signal.h" @@ -35,7 +35,7 @@ typedef struct _GtkWidget GtkWidget; typedef struct _GParamSpec GParamSpec; class BookmarkBubbleGtk : public BubbleDelegateGtk, - public NotificationObserver { + public content::NotificationObserver { public: // Shows the bookmark bubble, pointing at |anchor_widget|. static void Show(GtkWidget* anchor_widget, @@ -46,10 +46,10 @@ class BookmarkBubbleGtk : public BubbleDelegateGtk, // BubbleDelegateGtk: virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; private: BookmarkBubbleGtk(GtkWidget* anchor, @@ -120,7 +120,7 @@ class BookmarkBubbleGtk : public BubbleDelegateGtk, bool apply_edits_; bool remove_bookmark_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleGtk); }; diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc index 3567ce3..6209bf9 100644 --- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc +++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc @@ -32,9 +32,9 @@ #include "chrome/common/extensions/extension_action.h" #include "chrome/common/extensions/extension_resource.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" #include "grit/ui_resources.h" @@ -82,7 +82,7 @@ gint WidthForIconCount(gint icon_count) { using ui::SimpleMenuModel; -class BrowserActionButton : public NotificationObserver, +class BrowserActionButton : public content::NotificationObserver, public ImageLoadingTracker::Observer, public ExtensionContextMenuModel::PopupDelegate, public MenuGtk::Delegate { @@ -130,8 +130,9 @@ class BrowserActionButton : public NotificationObserver, signals_.ConnectAfter(widget(), "expose-event", G_CALLBACK(OnExposeEvent), this); - registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, - Source<ExtensionAction>(extension->browser_action())); + registrar_.Add( + this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, + content::Source<ExtensionAction>(extension->browser_action())); } ~BrowserActionButton() { @@ -152,8 +153,8 @@ class BrowserActionButton : public NotificationObserver, // NotificationObserver implementation. void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED) UpdateState(); else @@ -354,7 +355,7 @@ class BrowserActionButton : public NotificationObserver, SkBitmap default_skbitmap_; ui::GtkSignalRegistrar signals_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The context menu view and model for this extension action. scoped_ptr<MenuGtk> context_menu_; @@ -452,7 +453,7 @@ BrowserActionsToolbarGtk::BrowserActionsToolbarGtk(Browser* browser) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); } @@ -478,9 +479,10 @@ void BrowserActionsToolbarGtk::Update() { } } -void BrowserActionsToolbarGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BrowserActionsToolbarGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type); gtk_widget_set_visible(separator_, theme_service_->UsingNativeTheme()); } diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h index ab04fea..2dae108 100644 --- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h +++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h @@ -15,8 +15,8 @@ #include "chrome/browser/ui/gtk/custom_button.h" #include "chrome/browser/ui/gtk/menu_gtk.h" #include "chrome/browser/ui/gtk/overflow_button.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/slide_animation.h" #include "ui/base/gtk/gtk_signal.h" @@ -37,7 +37,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, public ui::AnimationDelegate, public MenuGtk::Delegate, public ui::SimpleMenuModel::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: explicit BrowserActionsToolbarGtk(Browser* browser); virtual ~BrowserActionsToolbarGtk(); @@ -60,10 +60,10 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, // Update the display of all buttons. void Update(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); bool animating() { return resize_animation_.is_animating(); @@ -213,7 +213,7 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, ui::GtkSignalRegistrar signals_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_; diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc index a1231f6..87a0f79 100644 --- a/chrome/browser/ui/gtk/browser_titlebar.cc +++ b/chrome/browser/ui/gtk/browser_titlebar.cc @@ -406,7 +406,7 @@ void BrowserTitlebar::Init() { theme_service_ = GtkThemeService::GetFrom( browser_window_->browser()->profile()); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); UpdateTitleAndIcon(); } @@ -991,8 +991,8 @@ bool BrowserTitlebar::GetAcceleratorForCommandId( } void BrowserTitlebar::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: UpdateTextColor(); diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h index bb4c6fb..d929278 100644 --- a/chrome/browser/ui/gtk/browser_titlebar.h +++ b/chrome/browser/ui/gtk/browser_titlebar.h @@ -15,8 +15,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/models/simple_menu_model.h" #include "ui/base/x/active_window_watcher_x.h" @@ -29,7 +29,7 @@ class MenuGtk; class PopupPageMenuModel; class TabContents; -class BrowserTitlebar : public NotificationObserver, +class BrowserTitlebar : public content::NotificationObserver, public ui::ActiveWindowWatcherX::Observer, public ui::SimpleMenuModel::Delegate { public: @@ -166,10 +166,10 @@ class BrowserTitlebar : public NotificationObserver, virtual bool GetAcceleratorForCommandId(int command_id, ui::Accelerator* accelerator); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Overriden from ActiveWindowWatcher::Observer. virtual void ActiveWindowChanged(GdkWindow* active_window); @@ -274,7 +274,7 @@ class BrowserTitlebar : public NotificationObserver, // Theme provider for building buttons. GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; }; #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc index 2b2cd692..1380dc2 100644 --- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc @@ -44,8 +44,8 @@ #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -105,7 +105,7 @@ BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window) NotificationService::AllSources()); registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, - Source<Profile>(browser_->profile())); + content::Source<Profile>(browser_->profile())); } BrowserToolbarGtk::~BrowserToolbarGtk() { @@ -124,7 +124,7 @@ void BrowserToolbarGtk::Init(GtkWindow* top_level_window) { theme_service_ = GtkThemeService::GetFrom(profile); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); offscreen_entry_.Own(gtk_entry_new()); @@ -228,7 +228,7 @@ void BrowserToolbarGtk::Init(GtkWindow* top_level_window) { wrench_menu_model_->bookmark_sub_menu_model()->SetMenuGtk(wrench_menu_.get()); registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, - Source<HostZoomMap>(profile->GetHostZoomMap())); + content::Source<HostZoomMap>(profile->GetHostZoomMap())); if (ShouldOnlyShowLocation()) { gtk_widget_show(event_box_); @@ -354,13 +354,13 @@ bool BrowserToolbarGtk::GetAcceleratorForCommandId( return !!accelerator_gtk; } -// NotificationObserver -------------------------------------------------------- +// content::NotificationObserver ----------------------------------------------- void BrowserToolbarGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { - NotifyPrefChanged(Details<std::string>(details).ptr()); + NotifyPrefChanged(content::Details<std::string>(details).ptr()); } else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { // Update the spacing around the menu buttons bool use_gtk = theme_service_->UsingNativeTheme(); diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_toolbar_gtk.h index e66dd30..e51b1721 100644 --- a/chrome/browser/ui/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.h @@ -15,8 +15,8 @@ #include "chrome/browser/ui/gtk/custom_button.h" #include "chrome/browser/ui/gtk/menu_gtk.h" #include "chrome/browser/ui/toolbar/wrench_menu_model.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/gtk_signal_registrar.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -40,7 +40,7 @@ class ToolbarModel; class BrowserToolbarGtk : public CommandUpdater::CommandObserver, public ui::AcceleratorProvider, public MenuGtk::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window); virtual ~BrowserToolbarGtk(); @@ -95,10 +95,10 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, virtual bool GetAcceleratorForCommandId(int id, ui::Accelerator* accelerator); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Message that we should react to a state change. void UpdateTabContents(TabContents* contents, bool should_restore_state); @@ -204,7 +204,7 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, StringPrefMember home_page_; BooleanPrefMember home_page_is_new_tab_page_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // A GtkEntry that isn't part of the hierarchy. We keep this for native // rendering. diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 5a2d325..dd196c0 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -1201,11 +1201,11 @@ void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { } void BrowserWindowGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_PREF_CHANGED: { - std::string* pref_name = Details<std::string>(details).ptr(); + std::string* pref_name = content::Details<std::string>(details).ptr(); if (*pref_name == prefs::kUseCustomChromeFrame) { UpdateCustomFrame(); } else { @@ -1531,7 +1531,7 @@ bool BrowserWindowGtk::CanClose() const { // Empty TabStripModel, it's now safe to allow the Window to be closed. NotificationService::current()->Notify( chrome::NOTIFICATION_WINDOW_CLOSED, - Source<GtkWindow>(window_), + content::Source<GtkWindow>(window_), NotificationService::NoDetails()); return true; } diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h index 30e50de..f1af45e 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.h +++ b/chrome/browser/ui/gtk/browser_window_gtk.h @@ -43,7 +43,7 @@ class TabStripGtk; // it needs to manipulate the window. class BrowserWindowGtk : public BrowserWindow, - public NotificationObserver, + public content::NotificationObserver, public TabStripModelObserver, public ui::ActiveWindowWatcherX::Observer, public InfoBarContainer::Delegate { @@ -156,8 +156,8 @@ class BrowserWindowGtk : public BrowserWindow, // Overridden from NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Overridden from TabStripModelObserver: virtual void TabDetachedAt(TabContentsWrapper* contents, int index); diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc index e93506a..3a3962a 100644 --- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc +++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc @@ -178,7 +178,7 @@ void BubbleGtk::Init(GtkWidget* anchor_widget, } registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); } @@ -342,8 +342,8 @@ void BubbleGtk::StackWindow() { } void BubbleGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED); if (theme_service_->UsingNativeTheme() && match_system_theme_) { gtk_widget_modify_bg(window_, GTK_STATE_NORMAL, NULL); diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.h b/chrome/browser/ui/gtk/bubble/bubble_gtk.h index d5d5958..c9ad7d3 100644 --- a/chrome/browser/ui/gtk/bubble/bubble_gtk.h +++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.h @@ -12,8 +12,8 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/gtk_signal_registrar.h" #include "ui/gfx/point.h" @@ -46,7 +46,7 @@ class BubbleDelegateGtk { // BubbleDelegateGtk::BubbleClosing(). Then the widgets and the underlying // object will be destroyed. You can also close and destroy the bubble by // calling Close(). -class BubbleGtk : public NotificationObserver { +class BubbleGtk : public content::NotificationObserver { public: // Where should the arrow be placed relative to the bubble? enum ArrowLocationGtk { @@ -76,10 +76,10 @@ class BubbleGtk : public NotificationObserver { // so you shouldn't hold a BubbleGtk pointer after calling Close(). void Close(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // If the content contains widgets that can steal our pointer and keyboard // grabs (e.g. GtkComboBox), this method should be called after a widget @@ -206,7 +206,7 @@ class BubbleGtk : public NotificationObserver { bool closed_by_escape_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; ui::GtkSignalRegistrar signals_; diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc index e175f60..21425f6 100644 --- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc +++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc @@ -17,7 +17,7 @@ #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "ui/base/gtk/gtk_hig_constants.h" #include "ui/base/l10n/l10n_util.h" @@ -85,7 +85,7 @@ CollectedCookiesGtk::CollectedCookiesGtk(GtkWindow* parent, : wrapper_(wrapper), status_changed_(false) { registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, - Source<TabSpecificContentSettings>( + content::Source<TabSpecificContentSettings>( wrapper->content_settings())); Init(); @@ -420,8 +420,8 @@ void CollectedCookiesGtk::EnableControls() { } void CollectedCookiesGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); window_->CloseConstrainedWindow(); } diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.h b/chrome/browser/ui/gtk/collected_cookies_gtk.h index 18d739e..9b1754d 100644 --- a/chrome/browser/ui/gtk/collected_cookies_gtk.h +++ b/chrome/browser/ui/gtk/collected_cookies_gtk.h @@ -14,8 +14,8 @@ #include "chrome/browser/ui/gtk/constrained_window_gtk.h" #include "chrome/browser/ui/gtk/gtk_tree.h" #include "chrome/common/content_settings.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" class CookiesTreeModel; @@ -28,7 +28,7 @@ class TabContentsWrapper; class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate, public gtk_tree::TreeAdapter::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: CollectedCookiesGtk(GtkWindow* parent, TabContentsWrapper* wrapper); @@ -57,8 +57,8 @@ class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate, // Notification Observer implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Create the information panes for the allowed and blocked cookies. GtkWidget* CreateAllowedPane(); @@ -82,7 +82,7 @@ class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate, CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnSwitchPage, gpointer, guint); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; ConstrainedWindow* window_; diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc index 2ce72b3..a27fb3f 100644 --- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc +++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc @@ -12,7 +12,7 @@ #include "chrome/browser/ui/webui/html_dialog_ui.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "ui/base/gtk/gtk_hig_constants.h" #include "ui/gfx/rect.h" diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc index b8e4622..821bf32 100644 --- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc @@ -18,7 +18,7 @@ #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/common/content_settings.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "grit/generated_resources.h" #include "grit/ui_resources.h" @@ -60,7 +60,7 @@ ContentSettingBubbleGtk::ContentSettingBubbleGtk( content_setting_bubble_model_(content_setting_bubble_model), bubble_(NULL) { registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_contents)); + content::Source<TabContents>(tab_contents)); BuildBubble(); } @@ -78,11 +78,12 @@ void ContentSettingBubbleGtk::BubbleClosing(BubbleGtk* bubble, delete this; } -void ContentSettingBubbleGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ContentSettingBubbleGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED); - DCHECK(source == Source<TabContents>(tab_contents_)); + DCHECK(source == content::Source<TabContents>(tab_contents_)); tab_contents_ = NULL; } diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h index edad286..b6b2b6a 100644 --- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.h +++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.h @@ -12,8 +12,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" #include "chrome/common/content_settings_types.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" class ContentSettingBubbleModel; @@ -25,7 +25,7 @@ class TabContents; // and when clicked, an instance of this class is created specialized for the // type of content being blocked. class ContentSettingBubbleGtk : public BubbleDelegateGtk, - public NotificationObserver { + public content::NotificationObserver { public: ContentSettingBubbleGtk( GtkWidget* anchor, @@ -43,10 +43,10 @@ class ContentSettingBubbleGtk : public BubbleDelegateGtk, // BubbleDelegateGtk: virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Builds the bubble and all the widgets that it displays. void BuildBubble(); @@ -70,7 +70,7 @@ class ContentSettingBubbleGtk : public BubbleDelegateGtk, TabContents* tab_contents_; // A registrar for listening for TAB_CONTENTS_DESTROYED notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Pass on delegate messages to this. BubbleDelegateGtk* delegate_; diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc index 0deabf3..1d7f8e4 100644 --- a/chrome/browser/ui/gtk/custom_button.cc +++ b/chrome/browser/ui/gtk/custom_button.cc @@ -41,7 +41,7 @@ CustomDrawButtonBase::CustomDrawButtonBase(GtkThemeService* theme_provider, registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_provider)); + content::Source<ThemeService>(theme_provider)); } else { // Load the button images from the resource bundle. ResourceBundle& rb = ResourceBundle::GetSharedInstance(); @@ -142,7 +142,8 @@ void CustomDrawButtonBase::SetBackground(SkColor color, } void CustomDrawButtonBase::Observe(int type, - const NotificationSource& source, const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(theme_service_); DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type); @@ -248,7 +249,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider, theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_provider)); + content::Source<ThemeService>(theme_provider)); } CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider, @@ -267,7 +268,7 @@ CustomDrawButton::CustomDrawButton(GtkThemeService* theme_provider, theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_provider)); + content::Source<ThemeService>(theme_provider)); } CustomDrawButton::~CustomDrawButton() { @@ -289,7 +290,8 @@ void CustomDrawButton::ForceChromeTheme() { } void CustomDrawButton::Observe(int type, - const NotificationSource& source, const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type); SetBrowserTheme(); } diff --git a/chrome/browser/ui/gtk/custom_button.h b/chrome/browser/ui/gtk/custom_button.h index b56945c..e76aaab 100644 --- a/chrome/browser/ui/gtk/custom_button.h +++ b/chrome/browser/ui/gtk/custom_button.h @@ -9,8 +9,8 @@ #include <gtk/gtk.h> #include "base/memory/scoped_ptr.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/slide_animation.h" @@ -28,7 +28,7 @@ class SkBitmap; // CustomDrawButtonBase provides the base for building a custom drawn button. // It handles managing the pixbufs containing all the static images used to draw // the button. It also manages painting these pixbufs. -class CustomDrawButtonBase : public NotificationObserver { +class CustomDrawButtonBase : public content::NotificationObserver { public: // If the images come from ResourceBundle rather than the theme provider, // pass in NULL for |theme_provider|. @@ -56,10 +56,10 @@ class CustomDrawButtonBase : public NotificationObserver { // Set the background details. void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask); - // Provide NotificationObserver implementation. + // Provide content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Get the CairoCachedSurface from |surfaces_| for |state|. @@ -89,7 +89,7 @@ class CustomDrawButtonBase : public NotificationObserver { bool flipped_; // Used to listen for theme change notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(CustomDrawButtonBase); }; @@ -126,7 +126,7 @@ class CustomDrawHoverController : public ui::AnimationDelegate { // CustomDrawButton is a plain button where all its various states are drawn // with static images. In GTK rendering mode, it will show the standard button // with GTK |stock_id|. -class CustomDrawButton : public NotificationObserver { +class CustomDrawButton : public content::NotificationObserver { public: // The constructor takes 4 resource ids. If a resource doesn't exist for a // button, pass in 0. @@ -192,10 +192,10 @@ class CustomDrawButton : public NotificationObserver { // Set the background details. void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Returns a standard close button. Pass a |theme_provider| to use Gtk icons // in Gtk rendering mode. @@ -230,7 +230,7 @@ class CustomDrawButton : public NotificationObserver { bool forcing_chrome_theme_; // Used to listen for theme change notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(CustomDrawButton); }; diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc index ea3a30e..4449d5c 100644 --- a/chrome/browser/ui/gtk/download/download_item_gtk.cc +++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc @@ -250,7 +250,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, } registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); // Set the initial width of the widget to be animated. @@ -381,8 +381,8 @@ void DownloadItemGtk::AnimationProgressed(const ui::Animation* animation) { } void DownloadItemGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { // Our GtkArrow is only visible in gtk mode. Otherwise, we let the custom // rendering code do whatever it wants. diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.h b/chrome/browser/ui/gtk/download/download_item_gtk.h index 9543150..6895fb3 100644 --- a/chrome/browser/ui/gtk/download/download_item_gtk.h +++ b/chrome/browser/ui/gtk/download/download_item_gtk.h @@ -14,8 +14,8 @@ #include "base/time.h" #include "chrome/browser/icon_manager.h" #include "content/browser/download/download_item.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/slide_animation.h" #include "ui/base/gtk/gtk_signal.h" @@ -38,7 +38,7 @@ class SlideAnimation; class DownloadItemGtk : public DownloadItem::Observer, public ui::AnimationDelegate, - public NotificationObserver { + public content::NotificationObserver { public: // DownloadItemGtk takes ownership of |download_item_model|. DownloadItemGtk(DownloadShelfGtk* parent_shelf, @@ -54,10 +54,10 @@ class DownloadItemGtk : public DownloadItem::Observer, // ui::AnimationDelegate implementation. virtual void AnimationProgressed(const ui::Animation* animation); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Called when the icon manager has finished loading the icon. We take // ownership of |icon_bitmap|. @@ -228,7 +228,7 @@ class DownloadItemGtk : public DownloadItem::Observer, // The last download file path for which we requested an icon. FilePath icon_filepath_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The time at which we were insantiated. base::Time creation_time_; diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc index cc7f0a1..713ddf8 100644 --- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc +++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc @@ -146,7 +146,7 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent) theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); gtk_widget_show_all(shelf_.get()); @@ -231,8 +231,8 @@ void DownloadShelfGtk::Closed() { } void DownloadShelfGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { GdkColor color = theme_service_->GetGdkColor( ThemeService::COLOR_TOOLBAR); diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.h b/chrome/browser/ui/gtk/download/download_shelf_gtk.h index dfc0bdc..c7aef1a 100644 --- a/chrome/browser/ui/gtk/download/download_shelf_gtk.h +++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.h @@ -15,8 +15,8 @@ #include "base/message_loop.h" #include "chrome/browser/download/download_shelf.h" #include "chrome/browser/ui/gtk/slide_animator_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" #include "ui/gfx/native_widget_types.h" @@ -33,7 +33,7 @@ class Point; } class DownloadShelfGtk : public DownloadShelf, - public NotificationObserver, + public content::NotificationObserver, public SlideAnimatorGtk::Delegate, public MessageLoopForUI::Observer { public: @@ -52,10 +52,10 @@ class DownloadShelfGtk : public DownloadShelf, // SlideAnimatorGtk::Delegate implementation. virtual void Closed(); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Returns the current height of the shelf. int GetHeight() const; @@ -135,7 +135,7 @@ class DownloadShelfGtk : public DownloadShelf, // Gives us our colors and theme information. GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // True if the shelf will automatically close when the user mouses out. bool close_on_mouse_out_; diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc index bbb1588..b0507d4 100644 --- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc +++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc @@ -8,8 +8,8 @@ #include "base/message_loop.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "grit/theme_resources.h" #include "ui/base/animation/linear_animation.h" @@ -31,7 +31,7 @@ const int kFrameRateHz = 60; const double kMoveFraction = 1.0 / 3.0; class DownloadStartedAnimationGtk : public ui::LinearAnimation, - public NotificationObserver { + public content::NotificationObserver { public: explicit DownloadStartedAnimationGtk(TabContents* tab_contents); @@ -51,8 +51,8 @@ class DownloadStartedAnimationGtk : public ui::LinearAnimation, // NotificationObserver virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // The top level window that floats over the browser and displays the // image. @@ -73,7 +73,7 @@ class DownloadStartedAnimationGtk : public ui::LinearAnimation, gfx::Rect tab_contents_bounds_; // A scoped container for notification registries. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationGtk); }; @@ -101,11 +101,11 @@ DownloadStartedAnimationGtk::DownloadStartedAnimationGtk( registrar_.Add( this, content::NOTIFICATION_TAB_CONTENTS_HIDDEN, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); registrar_.Add( this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); // TODO(estade): don't show up on the wrong virtual desktop. @@ -157,11 +157,11 @@ void DownloadStartedAnimationGtk::Close() { registrar_.Remove( this, content::NOTIFICATION_TAB_CONTENTS_HIDDEN, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); registrar_.Remove( this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); tab_contents_ = NULL; gtk_widget_destroy(popup_); @@ -186,9 +186,10 @@ void DownloadStartedAnimationGtk::AnimateToState(double state) { } } -void DownloadStartedAnimationGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void DownloadStartedAnimationGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { Close(); } diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc index 4ad8254..760b194 100644 --- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc @@ -22,8 +22,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_action.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -92,18 +92,20 @@ ExtensionInstalledBubbleGtk::ExtensionInstalledBubbleGtk( // be sure that a browser action or page action has had views created which we // can inspect for the purpose of pointing to them. registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, - Source<Profile>(browser->profile())); + content::Source<Profile>(browser->profile())); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - Source<Profile>(browser->profile())); + content::Source<Profile>(browser->profile())); } ExtensionInstalledBubbleGtk::~ExtensionInstalledBubbleGtk() {} -void ExtensionInstalledBubbleGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ExtensionInstalledBubbleGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { - const Extension* extension = Details<const Extension>(details).ptr(); + const Extension* extension = + content::Details<const Extension>(details).ptr(); if (extension == extension_) { // PostTask to ourself to allow all EXTENSION_LOADED Observers to run. MessageLoopForUI::current()->PostTask( @@ -112,7 +114,7 @@ void ExtensionInstalledBubbleGtk::Observe(int type, } } else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { const Extension* extension = - Details<UnloadedExtensionInfo>(details)->extension; + content::Details<UnloadedExtensionInfo>(details)->extension; if (extension == extension_) extension_ = NULL; } else { diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h index 1a06242..cb83dd0 100644 --- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h +++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.h @@ -11,8 +11,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" #include "chrome/browser/ui/gtk/custom_button.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkBitmap.h" class Browser; @@ -33,7 +33,7 @@ class SkBitmap; // ExtensionInstallBubble manages its own lifetime. class ExtensionInstalledBubbleGtk : public BubbleDelegateGtk, - public NotificationObserver, + public content::NotificationObserver, public base::RefCountedThreadSafe<ExtensionInstalledBubbleGtk> { public: // The behavior and content of this BubbleGtk comes in three varieties. @@ -63,10 +63,10 @@ class ExtensionInstalledBubbleGtk // Shows the bubble. Called internally via PostTask. void ShowInternal(); - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // BubbleDelegateGtk: virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; @@ -80,7 +80,7 @@ class ExtensionInstalledBubbleGtk const Extension* extension_; Browser *browser_; SkBitmap icon_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; BubbleType type_; // The number of times to retry showing the bubble if the browser action diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc index 51a2bcd..3014f0f 100644 --- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc +++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc @@ -23,8 +23,8 @@ #include "chrome/common/chrome_notification_types.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host_view_gtk.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" ExtensionPopupGtk* ExtensionPopupGtk::current_extension_popup_ = NULL; @@ -55,11 +55,11 @@ ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser, ShowPopup(); } else { registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, - Source<Profile>(host->profile())); + content::Source<Profile>(host->profile())); } registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, - Source<Profile>(host->profile())); + content::Source<Profile>(host->profile())); } ExtensionPopupGtk::~ExtensionPopupGtk() { @@ -80,8 +80,8 @@ void ExtensionPopupGtk::Show(const GURL& url, Browser* browser, } void ExtensionPopupGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: if (Details<ExtensionHost>(host_.get()) == details) @@ -145,7 +145,7 @@ void ExtensionPopupGtk::ShowPopup() { DevToolsWindow::OpenDevToolsWindow(host_->render_view_host()); // Listen for the the devtools window closing. registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, - Source<content::BrowserContext>(host_->profile())); + content::Source<content::BrowserContext>(host_->profile())); } // Only one instance should be showing at a time. Get rid of the old one, if diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h index 85c4180..57ee467 100644 --- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h +++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.h @@ -12,15 +12,15 @@ #include "base/task.h" #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/rect.h" class Browser; class ExtensionHost; class GURL; -class ExtensionPopupGtk : public NotificationObserver, +class ExtensionPopupGtk : public content::NotificationObserver, public BubbleDelegateGtk, public ExtensionViewGtk::Container { public: @@ -35,10 +35,10 @@ class ExtensionPopupGtk : public NotificationObserver, GtkWidget* anchor, bool inspect); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // BubbleDelegateGtk implementation. virtual void BubbleClosing(BubbleGtk* bubble, @@ -87,7 +87,7 @@ class ExtensionPopupGtk : public NotificationObserver, // The widget for anchoring the position of the bubble. GtkWidget* anchor_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; static ExtensionPopupGtk* current_extension_popup_; diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc index 0df4fbd..1513267 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, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); g_signal_connect(widget(), "parent-set", G_CALLBACK(OnParentSet), this); @@ -457,8 +457,8 @@ FindBarTesting* FindBarGtk::GetFindBarTesting() { } void FindBarGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED); // Force reshapings of the find bar window. diff --git a/chrome/browser/ui/gtk/find_bar_gtk.h b/chrome/browser/ui/gtk/find_bar_gtk.h index 810b8f7..1a5b064b 100644 --- a/chrome/browser/ui/gtk/find_bar_gtk.h +++ b/chrome/browser/ui/gtk/find_bar_gtk.h @@ -13,8 +13,8 @@ #include "chrome/browser/ui/find_bar/find_bar.h" #include "chrome/browser/ui/gtk/focus_store_gtk.h" #include "chrome/browser/ui/gtk/slide_animator_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" #include "ui/gfx/point.h" @@ -34,7 +34,7 @@ typedef struct _GtkFloatingContainer GtkFloatingContainer; // eventually pull out the model specific bits and share with Windows. class FindBarGtk : public FindBar, public FindBarTesting, - public NotificationObserver { + public content::NotificationObserver { public: explicit FindBarGtk(BrowserWindowGtk* window); virtual ~FindBarGtk(); @@ -67,10 +67,10 @@ class FindBarGtk : public FindBar, virtual string16 GetMatchCountText(); virtual int GetWidth(); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: void InitWidgets(); @@ -234,7 +234,7 @@ class FindBarGtk : public FindBar, // it up. gfx::Rect selection_rect_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(FindBarGtk); }; diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc index 93cb5bb..7028c3ba 100644 --- a/chrome/browser/ui/gtk/global_history_menu.cc +++ b/chrome/browser/ui/gtk/global_history_menu.cc @@ -122,7 +122,7 @@ void GlobalHistoryMenu::Init(GtkWidget* history_menu, // Register for notification when TopSites changes so that we can update // ourself. registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED, - Source<history::TopSites>(top_sites_)); + content::Source<history::TopSites>(top_sites_)); } } } @@ -283,8 +283,8 @@ void GlobalHistoryMenu::ClearMenuCallback(GtkWidget* menu_item, } void GlobalHistoryMenu::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_TOP_SITES_CHANGED) { GetTopSitesData(); } else { diff --git a/chrome/browser/ui/gtk/global_history_menu.h b/chrome/browser/ui/gtk/global_history_menu.h index 34356cb..446c442 100644 --- a/chrome/browser/ui/gtk/global_history_menu.h +++ b/chrome/browser/ui/gtk/global_history_menu.h @@ -12,8 +12,8 @@ #include "chrome/browser/sessions/tab_restore_service_observer.h" #include "chrome/browser/ui/gtk/global_menu_owner.h" #include "content/browser/cancelable_request.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -27,7 +27,7 @@ typedef struct _GdkPixbuf GdkPixbuf; // Controls the History menu. class GlobalHistoryMenu : public GlobalMenuOwner, - public NotificationObserver, + public content::NotificationObserver, public TabRestoreServiceObserver { public: explicit GlobalHistoryMenu(Browser* browser); @@ -80,10 +80,10 @@ class GlobalHistoryMenu : public GlobalMenuOwner, // Implementation detail of ClearMenuSection. static void ClearMenuCallback(GtkWidget* widget, ClearMenuClosure* closure); - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // For TabRestoreServiceObserver virtual void TabRestoreServiceChanged(TabRestoreService* service); @@ -114,7 +114,7 @@ class GlobalHistoryMenu : public GlobalMenuOwner, // A mapping from GtkMenuItems to HistoryItems that maintain data. MenuItemToHistoryMap menu_item_history_map_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; }; #endif // CHROME_BROWSER_UI_GTK_GLOBAL_HISTORY_MENU_H_ diff --git a/chrome/browser/ui/gtk/global_menu_bar.cc b/chrome/browser/ui/gtk/global_menu_bar.cc index f03a45c..b3b47a9 100644 --- a/chrome/browser/ui/gtk/global_menu_bar.cc +++ b/chrome/browser/ui/gtk/global_menu_bar.cc @@ -17,9 +17,9 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/gtk_util.h" @@ -284,8 +284,8 @@ void GlobalMenuBar::EnabledStateChangedForCommand(int id, bool enabled) { } void GlobalMenuBar::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type); const std::string& pref_name = *Details<std::string>(details).ptr(); DCHECK_EQ(prefs::kShowBookmarkBar, pref_name); diff --git a/chrome/browser/ui/gtk/global_menu_bar.h b/chrome/browser/ui/gtk/global_menu_bar.h index b1a6cc4..a0bf446 100644 --- a/chrome/browser/ui/gtk/global_menu_bar.h +++ b/chrome/browser/ui/gtk/global_menu_bar.h @@ -11,7 +11,7 @@ #include "chrome/browser/command_updater.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/ui/gtk/global_history_menu.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -31,7 +31,7 @@ typedef struct _GtkWidget GtkWidget; // bar itself is visible, so we insert a GtkMenuBar into the window hierarchy // and set it to be invisible. class GlobalMenuBar : public CommandUpdater::CommandObserver, - public NotificationObserver { + public content::NotificationObserver { public: static const int TAG_NORMAL = 0; static const int TAG_MOST_VISITED = 1; @@ -68,10 +68,10 @@ class GlobalMenuBar : public CommandUpdater::CommandObserver, // CommandUpdater::CommandObserver: virtual void EnabledStateChangedForCommand(int id, bool enabled); - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Updates the visibility of the bookmark bar on pref changes. void OnBookmarkBarVisibilityChanged(); diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc index cab2f69..22e0161 100644 --- a/chrome/browser/ui/gtk/gtk_theme_service.cc +++ b/chrome/browser/ui/gtk/gtk_theme_service.cc @@ -26,9 +26,9 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" #include "grit/ui_resources.h" @@ -336,7 +336,7 @@ bool GtkThemeService::HasCustomImage(int id) const { void GtkThemeService::InitThemesFor(NotificationObserver* observer) { observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(this), + content::Source<ThemeService>(this), NotificationService::NoDetails()); } @@ -368,8 +368,8 @@ bool GtkThemeService::UsingNativeTheme() const { } void GtkThemeService::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if ((type == chrome::NOTIFICATION_PREF_CHANGED) && (*Details<std::string>(details).ptr() == prefs::kUsesSystemTheme)) { #if !defined(OS_CHROMEOS) diff --git a/chrome/browser/ui/gtk/gtk_theme_service.h b/chrome/browser/ui/gtk/gtk_theme_service.h index 3558ba4..41420dc 100644 --- a/chrome/browser/ui/gtk/gtk_theme_service.h +++ b/chrome/browser/ui/gtk/gtk_theme_service.h @@ -12,7 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/themes/theme_service.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "ui/base/gtk/gtk_integers.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -43,7 +43,7 @@ class GtkThemeService : public ThemeService { // Calls |observer|.Observe() for the browser theme with this provider as the // source. - void InitThemesFor(NotificationObserver* observer); + void InitThemesFor(content::NotificationObserver* observer); // Overridden from ThemeService: // @@ -59,10 +59,10 @@ class GtkThemeService : public ThemeService { virtual bool UsingDefaultTheme() const; virtual bool UsingNativeTheme() const; - // Overridden from ThemeService, NotificationObserver: + // Overridden from ThemeService, content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Creates a GtkChromeButton instance, registered with this theme provider, // with a "destroy" signal to remove it from our internal list when it goes diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc index e9b9b30..e0a2db6 100644 --- a/chrome/browser/ui/gtk/infobars/infobar_gtk.cc +++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.cc @@ -96,7 +96,7 @@ InfoBarGtk::InfoBarGtk(InfoBarTabHelper* owner, InfoBarDelegate* delegate) this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); UpdateBorderColor(); } @@ -280,8 +280,8 @@ void InfoBarGtk::PlatformSpecificOnHeightsRecalculated() { } void InfoBarGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { UpdateBorderColor(); } diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.h b/chrome/browser/ui/gtk/infobars/infobar_gtk.h index 5835175..a312ceb 100644 --- a/chrome/browser/ui/gtk/infobars/infobar_gtk.h +++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.h @@ -13,8 +13,8 @@ #include "chrome/browser/infobars/infobar.h" #include "chrome/browser/infobars/infobar_delegate.h" #include "chrome/browser/ui/gtk/menu_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkPaint.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -29,7 +29,7 @@ class MenuModel; } class InfoBarGtk : public InfoBar, - public NotificationObserver { + public content::NotificationObserver { public: InfoBarGtk(InfoBarTabHelper* owner, InfoBarDelegate* delegate); virtual ~InfoBarGtk(); @@ -92,10 +92,10 @@ class InfoBarGtk : public InfoBar, virtual void PlatformSpecificOnCloseSoon() OVERRIDE; virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // The second highest widget in the hierarchy (after the |widget_|). GtkWidget* bg_box_; @@ -109,7 +109,7 @@ class InfoBarGtk : public InfoBar, // The theme provider, used for getting border colors. GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; private: CHROMEGTK_CALLBACK_0(InfoBarGtk, void, OnCloseButton); diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc index fd03932..3b39f4e 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc @@ -332,7 +332,7 @@ void LocationBarViewGtk::Init(bool popup_window_mode) { registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled, profile->GetPrefs(), this); @@ -555,7 +555,8 @@ void LocationBarViewGtk::OnSetFocus() { l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION), false); NotificationService::current()->Notify( chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED, - Source<Profile>(profile), Details<AccessibilityTextBoxInfo>(&info)); + content::Source<Profile>(profile), + content::Details<AccessibilityTextBoxInfo>(&info)); // Update the keyword and search hint states. OnChanged(); @@ -660,7 +661,7 @@ void LocationBarViewGtk::UpdatePageActions() { } NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, - Source<LocationBar>(this), + content::Source<LocationBar>(this), NotificationService::NoDetails()); } @@ -686,7 +687,7 @@ void LocationBarViewGtk::InvalidatePageActions() { if (page_action_views_.size() != count_before) { NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, - Source<LocationBar>(this), + content::Source<LocationBar>(this), NotificationService::NoDetails()); } } @@ -754,8 +755,8 @@ void LocationBarViewGtk::TestPageActionPressed(size_t index) { } void LocationBarViewGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { UpdateStarIcon(); return; @@ -1536,8 +1537,8 @@ void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility( if (visible != old_visible) { NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED, - Source<ExtensionAction>(page_action_), - Details<TabContents>(contents)); + content::Source<ExtensionAction>(page_action_), + content::Details<TabContents>(contents)); } } diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h index e7d74c6..ea55826 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h @@ -25,8 +25,8 @@ #include "chrome/browser/ui/gtk/menu_gtk.h" #include "chrome/browser/ui/omnibox/location_bar.h" #include "chrome/common/content_settings_types.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/common/page_transition_types.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/animation/animation_delegate.h" @@ -49,7 +49,7 @@ class ToolbarModel; class LocationBarViewGtk : public AutocompleteEditController, public LocationBar, public LocationBarTesting, - public NotificationObserver { + public content::NotificationObserver { public: explicit LocationBarViewGtk(Browser* browser); virtual ~LocationBarViewGtk(); @@ -134,10 +134,10 @@ class LocationBarViewGtk : public AutocompleteEditController, virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE; virtual void TestPageActionPressed(size_t index) OVERRIDE; - // Implement the NotificationObserver interface. + // Implement the content::NotificationObserver interface. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Edit background color. static const GdkColor kBackgroundColor; @@ -422,7 +422,7 @@ class LocationBarViewGtk : public AutocompleteEditController, // Provides colors and rendering mode. GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Width of the main |hbox_|. Used to properly elide the EV certificate. int hbox_width_; diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc index 701f4e7..9aa37a8 100644 --- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc +++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc @@ -32,9 +32,9 @@ #include "chrome/common/extensions/extension.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host_view.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" @@ -317,7 +317,7 @@ void BalloonViewImpl::Show(Balloon* balloon) { gtk_box_pack_end(GTK_BOX(hbox_), options_alignment, FALSE, FALSE, 0); notification_registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); // We don't do InitThemesFor() because it just forces a redraw. gtk_util::ActAsRoundedWindow(frame_container_, ui::kGdkBlack, 3, @@ -341,7 +341,7 @@ void BalloonViewImpl::Show(Balloon* balloon) { notification_registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, - Source<Balloon>(balloon)); + content::Source<Balloon>(balloon)); } void BalloonViewImpl::Update() { @@ -385,14 +385,14 @@ gfx::Rect BalloonViewImpl::GetContentsRectangle() const { } void BalloonViewImpl::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) { // If the renderer process attached to this balloon is disconnected // (e.g., because of a crash), we want to close the balloon. notification_registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, - Source<Balloon>(balloon_)); + content::Source<Balloon>(balloon_)); Close(false); } else if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { // Since all the buttons change their own properties, and our expose does diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h index 4a2afb8..45f7fd2 100644 --- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h +++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.h @@ -14,8 +14,8 @@ #include "chrome/browser/notifications/balloon.h" #include "chrome/browser/ui/gtk/menu_gtk.h" #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/gfx/point.h" @@ -26,9 +26,7 @@ class BalloonCollection; class CustomDrawButton; class GtkThemeService; class MenuGtk; -class NotificationDetails; class NotificationOptionsMenuModel; -class NotificationSource; namespace ui { class SlideAnimation; @@ -38,7 +36,7 @@ class SlideAnimation; // It draws a border, and within the border an HTML renderer. class BalloonViewImpl : public BalloonView, public MenuGtk::Delegate, - public NotificationObserver, + public content::NotificationObserver, public ui::AnimationDelegate { public: explicit BalloonViewImpl(BalloonCollection* collection); @@ -56,10 +54,10 @@ class BalloonViewImpl : public BalloonView, virtual void StoppedShowing(); private: - // NotificationObserver interface. + // content::NotificationObserver interface. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // ui::AnimationDelegate interface. virtual void AnimationProgressed(const ui::Animation* animation); @@ -131,7 +129,7 @@ class BalloonViewImpl : public BalloonView, // The button to open the options menu. scoped_ptr<CustomDrawButton> options_menu_button_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; // Is the menu currently showing? bool menu_showing_; diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc index 4c3fa32..2d875c5 100644 --- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc +++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc @@ -313,7 +313,7 @@ OmniboxPopupViewGtk::OmniboxPopupViewGtk(const gfx::Font& font, registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); // TODO(erg): There appears to be a bug somewhere in something which shows @@ -390,8 +390,8 @@ void OmniboxPopupViewGtk::OnDragCanceled() { } void OmniboxPopupViewGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED); if (theme_service_->UsingNativeTheme()) { diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h index 5903116..2385f56 100644 --- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h +++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h @@ -15,8 +15,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/autocomplete/autocomplete_popup_view.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/gfx/font.h" #include "webkit/glue/window_open_disposition.h" @@ -28,7 +28,7 @@ class OmniboxView; class SkBitmap; class OmniboxPopupViewGtk : public AutocompletePopupView, - public NotificationObserver { + public content::NotificationObserver { public: OmniboxPopupViewGtk(const gfx::Font& font, OmniboxView* omnibox_view, @@ -44,10 +44,10 @@ class OmniboxPopupViewGtk : public AutocompletePopupView, virtual void PaintUpdatesNow(); virtual void OnDragCanceled(); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Be friendly for unit tests. @@ -99,7 +99,7 @@ class OmniboxPopupViewGtk : public AutocompletePopupView, PangoLayout* layout_; GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Font used for suggestions after being derived from the constructor's // |font|. diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc index 89cc3bb..af059c2 100644 --- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc +++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc @@ -411,7 +411,7 @@ void OmniboxViewGtk::Init() { #if !defined(TOOLKIT_VIEWS) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); theme_service_->InitThemesFor(this); #else // Manually invoke SetBaseColor() because TOOLKIT_VIEWS doesn't observe @@ -919,8 +919,8 @@ OmniboxView* OmniboxViewGtk::Create(AutocompleteEditController* controller, #endif void OmniboxViewGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED); SetBaseColor(); diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h index a94a535..aaf240f 100644 --- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h +++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h @@ -17,8 +17,8 @@ #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/ui/omnibox/omnibox_view.h" #include "chrome/browser/ui/toolbar/toolbar_model.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/gtk_signal_registrar.h" @@ -49,7 +49,7 @@ class GtkThemeService; #endif class OmniboxViewGtk : public OmniboxView, - public NotificationObserver, + public content::NotificationObserver, public ui::AnimationDelegate { public: // Modeled like the Windows CHARRANGE. Represent a pair of cursor position @@ -162,10 +162,10 @@ class OmniboxViewGtk : public OmniboxView, views::View* location_bar); #endif - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Overridden from ui::AnimationDelegate. virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; @@ -469,7 +469,7 @@ class OmniboxViewGtk : public OmniboxView, // Supplies colors, et cetera. GtkThemeService* theme_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; #endif // Indicates if Enter key was pressed. diff --git a/chrome/browser/ui/gtk/overflow_button.cc b/chrome/browser/ui/gtk/overflow_button.cc index deb1433..9f31401 100644 --- a/chrome/browser/ui/gtk/overflow_button.cc +++ b/chrome/browser/ui/gtk/overflow_button.cc @@ -19,7 +19,7 @@ OverflowButton::OverflowButton(Profile* profile) : profile_(profile) { GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service)); + content::Source<ThemeService>(theme_service)); theme_service->InitThemesFor(this); } @@ -28,8 +28,8 @@ OverflowButton::~OverflowButton() { } void OverflowButton::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { GtkWidget* former_child = gtk_bin_get_child(GTK_BIN(widget())); if (former_child) gtk_widget_destroy(former_child); diff --git a/chrome/browser/ui/gtk/overflow_button.h b/chrome/browser/ui/gtk/overflow_button.h index 2028b3b..c172f47 100644 --- a/chrome/browser/ui/gtk/overflow_button.h +++ b/chrome/browser/ui/gtk/overflow_button.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_ #pragma once -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/owned_widget_gtk.h" typedef struct _GtkWidget GtkWidget; @@ -15,7 +15,7 @@ class Profile; // An overflow chevron button. The button itself is a plain gtk_chrome_button, // and this class handles theming it. -class OverflowButton : public NotificationObserver { +class OverflowButton : public content::NotificationObserver { public: explicit OverflowButton(Profile* profile); virtual ~OverflowButton(); @@ -23,16 +23,16 @@ class OverflowButton : public NotificationObserver { GtkWidget* widget() { return widget_.get(); } private: - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); ui::OwnedWidgetGtk widget_; Profile* profile_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; }; #endif // CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_ diff --git a/chrome/browser/ui/gtk/reload_button_gtk.cc b/chrome/browser/ui/gtk/reload_button_gtk.cc index b945934..fb686c7 100644 --- a/chrome/browser/ui/gtk/reload_button_gtk.cc +++ b/chrome/browser/ui/gtk/reload_button_gtk.cc @@ -14,7 +14,7 @@ #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" @@ -63,7 +63,7 @@ ReloadButtonGtk::ReloadButtonGtk(LocationBarViewGtk* location_bar, theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); } // Set the default double-click timer delay to the system double-click time. @@ -126,15 +126,15 @@ void ReloadButtonGtk::ChangeMode(Mode mode, bool force) { } //////////////////////////////////////////////////////////////////////////////// -// ReloadButtonGtk, NotificationObserver implementation: +// ReloadButtonGtk, content::NotificationObserver implementation: void ReloadButtonGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& /* details */) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type); GtkThemeService* provider = static_cast<GtkThemeService*>( - Source<ThemeService>(source).ptr()); + content::Source<ThemeService>(source).ptr()); DCHECK_EQ(provider, theme_service_); GtkButtonWidth = 0; UpdateThemeButtons(); diff --git a/chrome/browser/ui/gtk/reload_button_gtk.h b/chrome/browser/ui/gtk/reload_button_gtk.h index 901288a..fa68581 100644 --- a/chrome/browser/ui/gtk/reload_button_gtk.h +++ b/chrome/browser/ui/gtk/reload_button_gtk.h @@ -11,8 +11,8 @@ #include "base/basictypes.h" #include "base/timer.h" #include "chrome/browser/ui/gtk/custom_button.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -21,7 +21,7 @@ class GtkThemeService; class LocationBarViewGtk; class Task; -class ReloadButtonGtk : public NotificationObserver { +class ReloadButtonGtk : public content::NotificationObserver { public: enum Mode { MODE_RELOAD = 0, MODE_STOP }; @@ -34,10 +34,10 @@ class ReloadButtonGtk : public NotificationObserver { // immediately. void ChangeMode(Mode mode, bool force); - // Provide NotificationObserver implementation. + // Provide content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& /* details */); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: friend class ReloadButtonGtkTest; @@ -75,7 +75,7 @@ class ReloadButtonGtk : public NotificationObserver { Mode visible_mode_; // Used to listen for theme change notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; GtkThemeService* theme_service_; diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.cc b/chrome/browser/ui/gtk/status_bubble_gtk.cc index 6640a8b..30fb60c 100644 --- a/chrome/browser/ui/gtk/status_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/status_bubble_gtk.cc @@ -52,7 +52,7 @@ StatusBubbleGtk::StatusBubbleGtk(Profile* profile) theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); } StatusBubbleGtk::~StatusBubbleGtk() { @@ -238,8 +238,8 @@ void StatusBubbleGtk::UpdateDownloadShelfVisibility(bool visible) { } void StatusBubbleGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { UserChangedTheme(); } diff --git a/chrome/browser/ui/gtk/status_bubble_gtk.h b/chrome/browser/ui/gtk/status_bubble_gtk.h index c11b161..b419b1b 100644 --- a/chrome/browser/ui/gtk/status_bubble_gtk.h +++ b/chrome/browser/ui/gtk/status_bubble_gtk.h @@ -14,8 +14,8 @@ #include "base/memory/scoped_ptr.h" #include "base/timer.h" #include "chrome/browser/ui/status_bubble.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/gtk/gtk_signal.h" @@ -34,7 +34,7 @@ class SlideAnimation; // window manager to not try to be "helpful" and center our popups, etc. // We therefore position it absolutely in a GtkFixed, that we don't own. class StatusBubbleGtk : public StatusBubble, - public NotificationObserver, + public content::NotificationObserver, public ui::AnimationDelegate { public: explicit StatusBubbleGtk(Profile* profile); @@ -59,10 +59,10 @@ class StatusBubbleGtk : public StatusBubble, // the download shelf, when it is visible. virtual void UpdateDownloadShelfVisibility(bool visible); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Top of the widget hierarchy for a StatusBubble. This top level widget is // guarenteed to have its gtk_widget_name set to "status-bubble" for @@ -113,7 +113,7 @@ class StatusBubbleGtk : public StatusBubble, CHROMEGTK_CALLBACK_1(StatusBubbleGtk, gboolean, HandleEnterNotify, GdkEventCrossing*); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Provides colors. GtkThemeService* theme_service_; diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc index a3337cf..f60ad93 100644 --- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc +++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc @@ -11,7 +11,7 @@ #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/renderer_host/render_widget_host_view_gtk.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "ui/base/gtk/gtk_expanded_container.h" #include "ui/base/gtk/gtk_floating_container.h" @@ -66,7 +66,7 @@ void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) { HideTab(tab_); if (tab_) { registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_->tab_contents())); + content::Source<TabContents>(tab_->tab_contents())); } tab_ = tab; @@ -79,7 +79,7 @@ void TabContentsContainerGtk::SetTab(TabContentsWrapper* tab) { // Otherwise we actually have to add it to the widget hierarchy. PackTab(tab); registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_->tab_contents())); + content::Source<TabContents>(tab_->tab_contents())); } } @@ -97,7 +97,7 @@ void TabContentsContainerGtk::SetPreview(TabContentsWrapper* preview) { PackTab(preview); registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(preview_->tab_contents())); + content::Source<TabContents>(preview_->tab_contents())); } void TabContentsContainerGtk::RemovePreview() { @@ -111,7 +111,7 @@ void TabContentsContainerGtk::RemovePreview() { gtk_container_remove(GTK_CONTAINER(expanded_), preview_widget); registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(preview_->tab_contents())); + content::Source<TabContents>(preview_->tab_contents())); preview_ = NULL; } @@ -169,12 +169,13 @@ void TabContentsContainerGtk::DetachTab(TabContentsWrapper* tab) { } } -void TabContentsContainerGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void TabContentsContainerGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED); - TabContentsDestroyed(Source<TabContents>(source).ptr()); + TabContentsDestroyed(content::Source<TabContents>(source).ptr()); } void TabContentsContainerGtk::TabContentsDestroyed(TabContents* contents) { diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.h b/chrome/browser/ui/gtk/tab_contents_container_gtk.h index a538241..777d969 100644 --- a/chrome/browser/ui/gtk/tab_contents_container_gtk.h +++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.h @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "chrome/browser/ui/gtk/view_id_util.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" @@ -22,7 +22,7 @@ class TabContentsWrapper; typedef struct _GtkFloatingContainer GtkFloatingContainer; -class TabContentsContainerGtk : public NotificationObserver, +class TabContentsContainerGtk : public content::NotificationObserver, public ViewIDUtil::Delegate { public: explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble); @@ -45,10 +45,10 @@ class TabContentsContainerGtk : public NotificationObserver, // Remove the tab from the hierarchy. void DetachTab(TabContentsWrapper* tab); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); GtkWidget* widget() { return floating_.get(); } @@ -81,7 +81,7 @@ class TabContentsContainerGtk : public NotificationObserver, CHROMEGTK_CALLBACK_1(TabContentsContainerGtk, gboolean, OnFocus, GtkDirectionType); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The TabContentsWrapper for the currently selected tab. This will be showing // unless there is a preview contents. diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc index 93543f4..76859ff 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc @@ -19,7 +19,7 @@ #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "ui/gfx/screen.h" @@ -161,7 +161,7 @@ DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) { registrar_.Add( this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(dragged_tab_data.contents_->tab_contents())); + content::Source<TabContents>(dragged_tab_data.contents_->tab_contents())); return dragged_tab_data; } @@ -233,13 +233,14 @@ DraggedTabControllerGtk::GetJavaScriptDialogCreator() { } //////////////////////////////////////////////////////////////////////////////// -// DraggedTabControllerGtk, NotificationObserver implementation: +// DraggedTabControllerGtk, content::NotificationObserver implementation: -void DraggedTabControllerGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void DraggedTabControllerGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED); - TabContents* destroyed_contents = Source<TabContents>(source).ptr(); + TabContents* destroyed_contents = content::Source<TabContents>(source).ptr(); for (size_t i = 0; i < drag_data_->size(); ++i) { if (drag_data_->get(i)->contents_->tab_contents() == destroyed_contents) { // One of the tabs we're dragging has been destroyed. Cancel the drag. @@ -861,7 +862,8 @@ void DraggedTabControllerGtk::CleanUpDraggedTabs() { if (drag_data_->get(i)->contents_) { registrar_.Remove( this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(drag_data_->get(i)->contents_->tab_contents())); + content::Source<TabContents>( + drag_data_->get(i)->contents_->tab_contents())); } source_tabstrip_->DestroyDraggedTab(drag_data_->get(i)->tab_); drag_data_->get(i)->tab_ = NULL; diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h index 77ccdb2..51ce822 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h @@ -16,8 +16,8 @@ #include "chrome/browser/ui/gtk/tabs/drag_data.h" #include "chrome/browser/ui/tabs/dock_info.h" #include "content/browser/tab_contents/tab_contents_delegate.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/x/x11_util.h" class DraggedViewGtk; @@ -26,7 +26,7 @@ class TabStripGtk; class TabStripModel; class TabContentsWrapper; -class DraggedTabControllerGtk : public NotificationObserver, +class DraggedTabControllerGtk : public content::NotificationObserver, public TabContentsDelegate { public: // |source_tabstrip| is the tabstrip where the tabs reside before any @@ -105,10 +105,10 @@ class DraggedTabControllerGtk : public NotificationObserver, virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator() OVERRIDE; - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Returns the point where a detached window should be created given the // current mouse position. @@ -221,7 +221,7 @@ class DraggedTabControllerGtk : public NotificationObserver, bool AreTabsConsecutive(); // Handles registering for notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The tab strip |source_tab_| originated from. TabStripGtk* source_tabstrip_; diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc index 1d416dc..0058ee5 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc @@ -158,7 +158,7 @@ TabRendererGtk::LoadingAnimation::LoadingAnimation( animation_frame_(0) { registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); } TabRendererGtk::LoadingAnimation::LoadingAnimation( @@ -202,8 +202,8 @@ bool TabRendererGtk::LoadingAnimation::ValidateLoadingAnimation( void TabRendererGtk::LoadingAnimation::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED); data_.reset(new Data(theme_service_)); } @@ -276,7 +276,7 @@ TabRendererGtk::TabRendererGtk(ThemeService* theme_service) hover_animation_->SetSlideDuration(kHoverDurationMs); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); } TabRendererGtk::~TabRendererGtk() { @@ -556,7 +556,7 @@ void TabRendererGtk::SetBounds(const gfx::Rect& bounds) { } void TabRendererGtk::Observe(int type, - const NotificationSource& source, + const content::NotificationSource& source, const NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED); diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h index 4e702f7..2e05537 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h @@ -12,8 +12,8 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/string16.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/gtk/gtk_signal.h" @@ -36,7 +36,7 @@ class ThrobAnimation; } class TabRendererGtk : public ui::AnimationDelegate, - public NotificationObserver { + public content::NotificationObserver { public: // Possible animation states. enum AnimationState { @@ -45,7 +45,7 @@ class TabRendererGtk : public ui::AnimationDelegate, ANIMATION_LOADING }; - class LoadingAnimation : public NotificationObserver { + class LoadingAnimation : public content::NotificationObserver { public: struct Data { explicit Data(ThemeService* theme_service); @@ -80,16 +80,16 @@ class TabRendererGtk : public ui::AnimationDelegate, return data_->loading_animation_frames; } - // Provide NotificationObserver implementation. + // Provide content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: scoped_ptr<Data> data_; // Used to listen for theme change notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Gives us our throbber images. ThemeService* theme_service_; @@ -165,7 +165,7 @@ class TabRendererGtk : public ui::AnimationDelegate, // Provide NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, + const content::NotificationSource& source, const NotificationDetails& details); // Advance the loading animation to the next frame, or hide the animation if @@ -456,7 +456,7 @@ class TabRendererGtk : public ui::AnimationDelegate, bool is_active_; // Used to listen for theme change notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); }; diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc index d129c8a..a14ea30 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc @@ -710,7 +710,7 @@ TabStripGtk::TabStripGtk(TabStripModel* model, BrowserWindowGtk* window) hover_tab_selector_(model) { theme_service_->InitThemesFor(this); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(theme_service_)); + content::Source<ThemeService>(theme_service_)); } TabStripGtk::~TabStripGtk() { @@ -1307,11 +1307,11 @@ void TabStripGtk::DidProcessEvent(GdkEvent* event) { } /////////////////////////////////////////////////////////////////////////////// -// TabStripGtk, NotificationObserver implementation: +// TabStripGtk, content::NotificationObserver implementation: void TabStripGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { TabRendererGtk::SetSelectedTitleColor(theme_service_->GetColor( ThemeService::COLOR_TAB_TEXT)); diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h index 62cb727..bccd717 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h @@ -18,7 +18,7 @@ #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" #include "chrome/browser/ui/gtk/view_id_util.h" #include "chrome/browser/ui/tabs/hover_tab_selector.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/gtk/owned_widget_gtk.h" #include "ui/gfx/rect.h" @@ -31,7 +31,7 @@ class GtkThemeService; class TabStripGtk : public TabStripModelObserver, public TabGtk::TabDelegate, public MessageLoopForUI::Observer, - public NotificationObserver, + public content::NotificationObserver, public TabstripOriginProvider, public ViewIDUtil::Delegate { public: @@ -156,10 +156,10 @@ class TabStripGtk : public TabStripModelObserver, virtual void WillProcessEvent(GdkEvent* event); virtual void DidProcessEvent(GdkEvent* event); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Horizontal gap between mini-tabs and normal tabs. static const int mini_to_non_mini_gap_; @@ -417,7 +417,7 @@ class TabStripGtk : public TabStripModelObserver, // Optionally a full Layout will be performed, specified by |layout|. void FinishAnimation(TabAnimation* animation, bool layout); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The Tabs we contain, and their last generated "good" bounds. std::vector<TabData> tab_data_; diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc index 168c224..8c4b766 100644 --- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc +++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc @@ -36,9 +36,10 @@ void ThemeInstallBubbleViewGtk::Show(GtkWindow* parent) { instance_ = new ThemeInstallBubbleViewGtk(GTK_WIDGET(parent)); } -void ThemeInstallBubbleViewGtk::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ThemeInstallBubbleViewGtk::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (--num_loads_extant_ == 0) delete this; } diff --git a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h index 118b9d9..f008e79 100644 --- a/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h +++ b/chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h @@ -9,18 +9,18 @@ #include <gtk/gtk.h> #include "base/basictypes.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/gtk/gtk_signal.h" -class ThemeInstallBubbleViewGtk : public NotificationObserver { +class ThemeInstallBubbleViewGtk : public content::NotificationObserver { public: static void Show(GtkWindow* parent); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: explicit ThemeInstallBubbleViewGtk(GtkWidget* parent); @@ -51,7 +51,7 @@ class ThemeInstallBubbleViewGtk : public NotificationObserver { // The number of loads we represent. When it reaches 0 we delete ourselves. int num_loads_extant_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Our one instance. We don't allow more than one to exist at a time. static ThemeInstallBubbleViewGtk* instance_; |