summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/views')
-rw-r--r--chrome/browser/ui/views/accessibility_event_router_views_unittest.cc12
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view.h10
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc8
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc6
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc2
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc8
-rw-r--r--chrome/browser/ui/views/browser_actions_container.h14
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.cc12
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.h14
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.cc13
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.h14
-rw-r--r--chrome/browser/ui/views/download/download_started_animation_win.cc31
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.cc14
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.h14
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.cc20
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.h14
-rw-r--r--chrome/browser/ui/views/extensions/extension_popup.cc24
-rw-r--r--chrome/browser/ui/views/extensions/extension_popup.h12
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc3
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc17
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h12
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc7
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.h14
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc7
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.h14
-rw-r--r--chrome/browser/ui/views/html_dialog_view.cc16
-rw-r--r--chrome/browser/ui/views/html_dialog_view.h14
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc14
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.h8
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc12
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.h14
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc6
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.h10
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container.cc33
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container.h14
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc4
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container_native.h14
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc5
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.h14
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.cc22
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.h14
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc7
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.h14
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc10
-rw-r--r--chrome/browser/ui/views/toolbar_view.h10
-rw-r--r--chrome/browser/ui/views/wrench_menu.cc25
-rw-r--r--chrome/browser/ui/views/wrench_menu.h14
48 files changed, 317 insertions, 301 deletions
diff --git a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
index fb9fb24..4626f00 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/views/accessibility_event_router_views.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/common/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/controls/button/text_button.h"
@@ -87,7 +87,7 @@ class AccessibilityWindowDelegate : public views::WidgetDelegate {
class AccessibilityEventRouterViewsTest
: public testing::Test,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
virtual void SetUp() {
views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate();
@@ -111,11 +111,11 @@ class AccessibilityEventRouterViewsTest
// Implement NotificationObserver::Observe and store information about a
// ACCESSIBILITY_CONTROL_FOCUSED event.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
ASSERT_EQ(type, chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED);
const AccessibilityControlInfo* info =
- Details<const AccessibilityControlInfo>(details).ptr();
+ content::Details<const AccessibilityControlInfo>(details).ptr();
focus_event_count_++;
last_control_name_ = info->name();
}
@@ -157,7 +157,7 @@ TEST_F(AccessibilityEventRouterViewsTest, MAYBE_TestFocusNotification) {
button1->RequestFocus();
// Start listening to ACCESSIBILITY_CONTROL_FOCUSED notifications.
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
registrar.Add(this,
chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED,
NotificationService::AllSources());
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 743ae14..0db33c9 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -1116,13 +1116,13 @@ void BookmarkBarView::ShowContextMenuForView(View* source,
}
void BookmarkBarView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(browser_->profile());
switch (type) {
case chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN: {
StopThrobbing(true);
- GURL url = *(Details<GURL>(details).ptr());
+ GURL url = *(content::Details<GURL>(details).ptr());
const BookmarkNode* node = model_->GetMostRecentlyAddedNodeForURL(url);
if (!node)
return; // Generally shouldn't happen.
@@ -1174,7 +1174,7 @@ void BookmarkBarView::Init() {
size_animation_.reset(new ui::SlideAnimation(this));
Profile* profile = browser_->profile();
- Source<Profile> ns_source(profile->GetOriginalProfile());
+ content::Source<Profile> ns_source(profile->GetOriginalProfile());
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN, ns_source);
registrar_.Add(this, chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN, ns_source);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
index 4b70121..cec6378 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
@@ -19,7 +19,7 @@
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h"
#include "chrome/browser/ui/views/detachable_toolbar_view.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "views/context_menu_controller.h"
#include "views/controls/button/button.h"
@@ -54,7 +54,7 @@ class BookmarkBarView : public DetachableToolbarView,
public BookmarkModelObserver,
public views::ViewMenuDelegate,
public views::ButtonListener,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ContextMenuController,
public views::DragController,
public ui::AnimationDelegate,
@@ -239,8 +239,8 @@ class BookmarkBarView : public DetachableToolbarView,
// NotificationService:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// If true we're running tests. This short circuits a couple of animations.
static bool testing_;
@@ -357,7 +357,7 @@ class BookmarkBarView : public DetachableToolbarView,
// desired bounds. If |compute_bounds_only| = FALSE, the bounds are set.
gfx::Size LayoutItems(bool compute_bounds_only);
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used for opening urls.
PageNavigator* page_navigator_;
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 917eaa2..1888bf8 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -473,7 +473,7 @@ VIEW_TEST(BookmarkBarViewTest3, Submenus)
// Observer that posts task upon the context menu creation.
// This is necessary for Linux as the context menu has to check
// the clipboard, which invokes the event loop.
-class ContextMenuNotificationObserver : public NotificationObserver {
+class ContextMenuNotificationObserver : public content::NotificationObserver {
public:
explicit ContextMenuNotificationObserver(const base::Closure& task)
: task_(task) {
@@ -483,8 +483,8 @@ class ContextMenuNotificationObserver : public NotificationObserver {
}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
MessageLoop::current()->PostTask(FROM_HERE, task_);
}
@@ -492,7 +492,7 @@ class ContextMenuNotificationObserver : public NotificationObserver {
void set_task(const base::Closure& task) { task_ = task; }
private:
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
base::Closure task_;
DISALLOW_COPY_AND_ASSIGN(ContextMenuNotificationObserver);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 237b56b..d20f96f 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -105,8 +105,8 @@ void BookmarkBubbleView::Show(views::Widget* parent,
GURL url_ptr(url);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_SHOWN,
- Source<Profile>(profile->GetOriginalProfile()),
- Details<GURL>(&url_ptr));
+ content::Source<Profile>(profile->GetOriginalProfile()),
+ content::Details<GURL>(&url_ptr));
bookmark_bubble_->BubbleShown();
}
@@ -320,7 +320,7 @@ void BookmarkBubbleView::BubbleClosing(Bubble* bubble,
delegate_->BubbleClosing(bubble, closed_by_escape);
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_BUBBLE_HIDDEN,
- Source<Profile>(profile_->GetOriginalProfile()),
+ content::Source<Profile>(profile_->GetOriginalProfile()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
index acbfe14..f63b779 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc
@@ -45,7 +45,7 @@ BookmarkContextMenu::~BookmarkContextMenu() {
void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
- Source<BookmarkContextMenu>(this),
+ content::Source<BookmarkContextMenu>(this),
NotificationService::NoDetails());
// width/height don't matter here.
if (menu_runner_->RunMenuAt(
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 697ce7c6..67b47bc 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -29,7 +29,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.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"
@@ -80,7 +80,7 @@ BrowserActionButton::BrowserActionButton(const Extension* extension,
// should call UpdateState() after creation.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
- Source<ExtensionAction>(browser_action_));
+ content::Source<ExtensionAction>(browser_action_));
}
void BrowserActionButton::Destroy() {
@@ -190,8 +190,8 @@ GURL BrowserActionButton::GetPopupUrl() {
}
void BrowserActionButton::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED);
UpdateState();
// The browser action may have become visible/hidden so we need to make
diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h
index 4d0c783..688000a 100644
--- a/chrome/browser/ui/views/browser_actions_container.h
+++ b/chrome/browser/ui/views/browser_actions_container.h
@@ -19,8 +19,8 @@
#include "chrome/browser/ui/views/browser_bubble.h"
#include "chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h"
#include "chrome/browser/ui/views/extensions/extension_popup.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/tween.h"
#include "views/controls/button/menu_button.h"
@@ -60,7 +60,7 @@ class ResizeArea;
class BrowserActionButton : public views::MenuButton,
public views::ButtonListener,
public ImageLoadingTracker::Observer,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserActionButton(const Extension* extension,
BrowserActionsContainer* panel);
@@ -90,10 +90,10 @@ class BrowserActionButton : public views::MenuButton,
const ExtensionResource& resource,
int index) OVERRIDE;
- // 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;
// MenuButton behavior overrides. These methods all default to TextButton
// behavior unless this button is a popup. In that case, it uses MenuButton
@@ -143,7 +143,7 @@ class BrowserActionButton : public views::MenuButton,
// The context menu. This member is non-NULL only when the menu is shown.
views::MenuItemView* context_menu_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
friend class DeleteTask<BrowserActionButton>;
diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc
index df6ed68..602eafc 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -15,8 +15,8 @@
#include "chrome/browser/ui/views/constrained_window_views.h"
#include "chrome/browser/ui/views/cookie_info_view.h"
#include "chrome/common/chrome_notification_types.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/locale_settings.h"
#include "grit/theme_resources.h"
@@ -178,7 +178,7 @@ CollectedCookiesWin::CollectedCookiesWin(gfx::NativeWindow parent_window,
status_changed_(false) {
TabSpecificContentSettings* content_settings = wrapper->content_settings();
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
- Source<TabSpecificContentSettings>(content_settings));
+ content::Source<TabSpecificContentSettings>(content_settings));
Init();
@@ -503,11 +503,11 @@ void CollectedCookiesWin::AddContentException(views::TreeView* tree_view,
}
///////////////////////////////////////////////////////////////////////////////
-// NotificationObserver implementation.
+// content::NotificationObserver implementation.
void CollectedCookiesWin::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/views/collected_cookies_win.h b/chrome/browser/ui/views/collected_cookies_win.h
index 5f467f7..a0ec632 100644
--- a/chrome/browser/ui/views/collected_cookies_win.h
+++ b/chrome/browser/ui/views/collected_cookies_win.h
@@ -8,8 +8,8 @@
#include "base/compiler_specific.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 "views/controls/tabbed_pane/tabbed_pane_listener.h"
#include "views/controls/tree/tree_view.h"
#include "views/window/dialog_delegate.h"
@@ -33,7 +33,7 @@ class TextButton;
// ShowCollectedCookiesDialog() on the delegate of the tab contents wrapper's
// content settings tab helper.
class CollectedCookiesWin : public views::DialogDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ButtonListener,
public views::TabbedPaneListener,
public views::TreeViewController,
@@ -79,12 +79,12 @@ class CollectedCookiesWin : public views::DialogDelegate,
void AddContentException(views::TreeView* tree_view, ContentSetting setting);
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
ConstrainedWindow* window_;
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index 37e2093..a725f57 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/bubble/bubble.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 "ui/base/l10n/l10n_util.h"
@@ -116,7 +116,7 @@ ContentSettingBubbleContents::ContentSettingBubbleContents(
manage_link_(NULL),
close_button_(NULL) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
ContentSettingBubbleContents::~ContentSettingBubbleContents() {
@@ -178,11 +178,12 @@ void ContentSettingBubbleContents::LinkClicked(views::Link* source,
content_setting_bubble_model_->OnPopupClicked(i->second);
}
-void ContentSettingBubbleContents::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ContentSettingBubbleContents::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/views/content_setting_bubble_contents.h b/chrome/browser/ui/views/content_setting_bubble_contents.h
index 9f8cbe4..4ea5ced 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.h
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.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 "views/controls/button/button.h"
#include "views/controls/link_listener.h"
@@ -39,7 +39,7 @@ class RadioButton;
class ContentSettingBubbleContents : public views::View,
public views::ButtonListener,
public views::LinkListener,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ContentSettingBubbleContents(
ContentSettingBubbleModel* content_setting_bubble_model,
@@ -66,10 +66,10 @@ class ContentSettingBubbleContents : public views::View,
// views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Creates the child views.
void InitControlLayout();
@@ -84,7 +84,7 @@ class ContentSettingBubbleContents : public views::View,
TabContents* tab_contents_;
// A registrar for listening for TAB_CONTENTS_DESTROYED notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The Bubble holding us.
Bubble* bubble_;
diff --git a/chrome/browser/ui/views/download/download_started_animation_win.cc b/chrome/browser/ui/views/download/download_started_animation_win.cc
index 9bdda8b..9af05d9 100644
--- a/chrome/browser/ui/views/download/download_started_animation_win.cc
+++ b/chrome/browser/ui/views/download/download_started_animation_win.cc
@@ -5,9 +5,9 @@
#include "chrome/browser/download/download_started_animation.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.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"
@@ -35,7 +35,7 @@ namespace {
// simply call "new DownloadStartAnimation"; the class cleans itself up when it
// finishes animating.
class DownloadStartedAnimationWin : public ui::LinearAnimation,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ImageView {
public:
explicit DownloadStartedAnimationWin(TabContents* tab_contents);
@@ -50,10 +50,10 @@ class DownloadStartedAnimationWin : public ui::LinearAnimation,
// Animation
virtual void AnimateToState(double state);
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// We use a HWND for the popup so that it may float above any HWNDs in our UI.
views::Widget* popup_;
@@ -69,7 +69,7 @@ class DownloadStartedAnimationWin : public ui::LinearAnimation,
gfx::Rect tab_contents_bounds_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationWin);
};
@@ -94,11 +94,11 @@ DownloadStartedAnimationWin::DownloadStartedAnimationWin(
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_));
SetImage(kDownloadImage);
@@ -141,11 +141,11 @@ void DownloadStartedAnimationWin::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;
popup_->Close();
}
@@ -167,9 +167,10 @@ void DownloadStartedAnimationWin::AnimateToState(double state) {
}
}
-void DownloadStartedAnimationWin::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DownloadStartedAnimationWin::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
index 98d3c3b..c2bc0b6 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.cc
+++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
@@ -14,8 +14,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.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"
#include "views/widget/widget.h"
@@ -50,7 +50,7 @@ ExtensionDialog::ExtensionDialog(ExtensionHost* host,
// Listen for the containing view calling window.close();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
ExtensionDialog::~ExtensionDialog() {
@@ -150,15 +150,15 @@ views::View* ExtensionDialog::GetContentsView() {
}
/////////////////////////////////////////////////////////////////////////////
-// NotificationObserver overrides.
+// content::NotificationObserver overrides.
void ExtensionDialog::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE:
// If we aren't the host of the popup, then disregard the notification.
- if (Details<ExtensionHost>(host()) != details)
+ if (content::Details<ExtensionHost>(host()) != details)
return;
Close();
break;
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.h b/chrome/browser/ui/views/extensions/extension_dialog.h
index d00e204..072a408 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.h
+++ b/chrome/browser/ui/views/extensions/extension_dialog.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/memory/ref_counted.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 "views/widget/widget_delegate.h"
class Browser;
@@ -27,7 +27,7 @@ class Widget;
// Dialog is automatically centered in the browser window and has fixed size.
// For example, used by the Chrome OS file browser.
class ExtensionDialog : public views::WidgetDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCounted<ExtensionDialog> {
public:
virtual ~ExtensionDialog();
@@ -60,10 +60,10 @@ class ExtensionDialog : public views::WidgetDelegate,
virtual const views::Widget* GetWidget() const OVERRIDE;
virtual views::View* GetContentsView() OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// Use Show() to create instances.
@@ -80,7 +80,7 @@ class ExtensionDialog : public views::WidgetDelegate,
// The contained host for the view.
scoped_ptr<ExtensionHost> extension_host_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The observer of this popup.
ExtensionDialogObserver* observer_;
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index c7d1a3a..c8962f8 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -23,8 +23,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_standard.h"
#include "ui/base/l10n/l10n_util.h"
@@ -305,18 +305,20 @@ ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension,
// be sure that a BrowserAction or PageAction has had views created which we
// can inspect for the purpose of previewing 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()));
}
ExtensionInstalledBubble::~ExtensionInstalledBubble() {}
-void ExtensionInstalledBubble::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ExtensionInstalledBubble::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_) {
animation_wait_retries_ = 0;
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
@@ -326,7 +328,7 @@ void ExtensionInstalledBubble::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/views/extensions/extension_installed_bubble.h b/chrome/browser/ui/views/extensions/extension_installed_bubble.h
index ef36721..f269ed1 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.h
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.h
@@ -8,8 +8,8 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/ui/views/bubble/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 "third_party/skia/include/core/SkBitmap.h"
class Browser;
@@ -31,7 +31,7 @@ class SkBitmap;
// ExtensionInstallBubble manages its own lifetime.
class ExtensionInstalledBubble
: public BubbleDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCountedThreadSafe<ExtensionInstalledBubble> {
public:
// The behavior and content of this Bubble comes in these varieties:
@@ -62,10 +62,10 @@ class ExtensionInstalledBubble
// 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;
// BubbleDelegate
virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
@@ -75,7 +75,7 @@ class ExtensionInstalledBubble
const Extension* extension_;
Browser* browser_;
SkBitmap icon_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
InstalledBubbleContent* bubble_content_;
BubbleType type_;
diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc
index 949040a..654db01 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.cc
+++ b/chrome/browser/ui/views/extensions/extension_popup.cc
@@ -17,8 +17,8 @@
#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_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
@@ -62,11 +62,11 @@ ExtensionPopup::ExtensionPopup(
// We wait to show the popup until the contained host finishes loading.
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
// Listen for the containing view calling window.close();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
- Source<Profile>(host->profile()));
+ content::Source<Profile>(host->profile()));
}
ExtensionPopup::~ExtensionPopup() {
@@ -118,19 +118,21 @@ void ExtensionPopup::BubbleLostFocus(BrowserBubble* bubble,
void ExtensionPopup::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:
// Once we receive did stop loading, the content will be complete and
// the width will have been computed. Now it's safe to show.
- if (extension_host_.get() == Details<ExtensionHost>(details).ptr()) {
+ if (extension_host_.get() ==
+ content::Details<ExtensionHost>(details).ptr()) {
Show(true);
if (inspect_with_devtools_) {
// Listen for the the devtools window closing.
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
- Source<content::BrowserContext>(extension_host_->profile()));
+ content::Source<content::BrowserContext>(
+ extension_host_->profile()));
DevToolsWindow::ToggleDevToolsWindow(
extension_host_->render_view_host(),
DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE);
@@ -139,15 +141,15 @@ void ExtensionPopup::Observe(int type,
break;
case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE:
// If we aren't the host of the popup, then disregard the notification.
- if (Details<ExtensionHost>(host()) != details)
+ if (content::Details<ExtensionHost>(host()) != details)
return;
Close();
break;
case content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING:
// Make sure its the devtools window that inspecting our popup.
- if (Details<RenderViewHost>(extension_host_->render_view_host()) !=
- details)
+ if (content::Details<RenderViewHost>(
+ extension_host_->render_view_host()) != details)
return;
// If the devtools window is closing, we post a task to ourselves to
diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h
index c1a9412..0f55df8 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.h
+++ b/chrome/browser/ui/views/extensions/extension_popup.h
@@ -10,7 +10,7 @@
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/ui/views/browser_bubble.h"
#include "chrome/browser/ui/views/extensions/extension_view.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"
#include "views/bubble/bubble_border.h"
@@ -26,7 +26,7 @@ class Widget;
class ExtensionPopup : public BrowserBubble,
public BrowserBubble::Delegate,
public ExtensionView::Container,
- public NotificationObserver,
+ public content::NotificationObserver,
public base::RefCounted<ExtensionPopup> {
public:
// Observer to ExtensionPopup events.
@@ -82,10 +82,10 @@ class ExtensionPopup : public BrowserBubble,
virtual void BubbleLostFocus(BrowserBubble* bubble,
bool lost_focus_to_child);
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// ExtensionView::Container overrides.
virtual void OnExtensionMouseMove(ExtensionView* view) { }
@@ -122,7 +122,7 @@ class ExtensionPopup : public BrowserBubble,
// Whether the ExtensionPopup is current going about closing itself.
bool closing_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The observer of this popup.
Observer* observer_;
diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
index 89ccea0..0408ed0 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -332,7 +332,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_PasteWithoutTextChange) {
// Press Ctrl-V to paste the content back, it should start finding even if the
// content is not changed.
- Source<TabContents> notification_source(browser()->GetSelectedTabContents());
+ content::Source<TabContents> notification_source(
+ browser()->GetSelectedTabContents());
ui_test_utils::WindowedNotificationObserverWithDetails
<FindNotificationDetails> observer(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e36302d..31d8ec6 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -329,9 +329,10 @@ BrowserView::BrowserView(Browser* browser)
{
browser_->tabstrip_model()->AddObserver(this);
- registrar_.Add(this,
- chrome::NOTIFICATION_SIDEBAR_CHANGED,
- Source<SidebarManager>(SidebarManager::GetInstance()));
+ registrar_.Add(
+ this,
+ chrome::NOTIFICATION_SIDEBAR_CHANGED,
+ content::Source<SidebarManager>(SidebarManager::GetInstance()));
}
BrowserView::~BrowserView() {
@@ -1336,14 +1337,14 @@ ToolbarView* BrowserView::GetToolbarView() const {
}
///////////////////////////////////////////////////////////////////////////////
-// BrowserView, NotificationObserver implementation:
+// BrowserView, content::NotificationObserver implementation:
void BrowserView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_SIDEBAR_CHANGED:
- if (Details<SidebarContainer>(details)->tab_contents() ==
+ if (content::Details<SidebarContainer>(details)->tab_contents() ==
browser_->GetSelectedTabContents()) {
UpdateSidebar();
}
@@ -1676,7 +1677,7 @@ bool BrowserView::CanClose() {
// Empty TabStripModel, it's now safe to allow the Window to be closed.
NotificationService::current()->Notify(
chrome::NOTIFICATION_WINDOW_CLOSED,
- Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
+ content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
NotificationService::NoDetails());
return true;
}
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index f0e844f..e0121e5 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -22,7 +22,7 @@
#include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
#include "chrome/browser/ui/views/tabs/abstract_tab_strip_view.h"
#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/gfx/native_widget_types.h"
#include "views/controls/single_split_view.h"
@@ -81,7 +81,7 @@ class Menu;
class BrowserView : public BrowserBubbleHost,
public BrowserWindow,
public BrowserWindowTesting,
- public NotificationObserver,
+ public content::NotificationObserver,
public TabStripModelObserver,
public ui::SimpleMenuModel::Delegate,
public views::WidgetDelegate,
@@ -339,10 +339,10 @@ class BrowserView : public BrowserBubbleHost,
virtual views::View* GetSidebarContainerView() const OVERRIDE;
virtual ToolbarView* GetToolbarView() const OVERRIDE;
- // 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 TabStripModelObserver:
virtual void TabDetachedAt(TabContentsWrapper* contents, int index) OVERRIDE;
@@ -703,7 +703,7 @@ class BrowserView : public BrowserBubbleHost,
UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Used to measure the loading spinner animation rate.
base::TimeTicks last_animation_time_;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index b205560..febcc68 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -475,9 +475,10 @@ void GlassBrowserFrameView::DisplayNextThrobberFrame() {
reinterpret_cast<LPARAM>(throbber_icons_[throbber_frame_]));
}
-void GlassBrowserFrameView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void GlassBrowserFrameView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.h b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
index bb8f96f..c993244 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/views/frame/browser_frame_win.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_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 "views/controls/button/button.h"
#include "views/window/non_client_view.h"
@@ -19,7 +19,7 @@ class AvatarMenuButton;
class SkBitmap;
class GlassBrowserFrameView : public BrowserNonClientFrameView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// Constructs a non-client view for an BrowserFrame.
GlassBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
@@ -83,10 +83,10 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// Displays the next throbber frame.
void DisplayNextThrobberFrame();
- // 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;
// Updates the title and icon of the avatar button.
void UpdateAvatarInfo();
@@ -113,7 +113,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// The index of the current frame of the throbber animation.
int throbber_frame_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
static const int kThrobberIconCount = 24;
static HICON throbber_icons_[kThrobberIconCount];
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 85d7b73..dc623fd 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -490,9 +490,10 @@ SkBitmap OpaqueBrowserFrameView::GetFaviconForTabIconView() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, protected:
-void OpaqueBrowserFrameView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void OpaqueBrowserFrameView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
index d678ec4..09a52c2 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
@@ -10,8 +10,8 @@
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "chrome/browser/ui/views/tab_icon_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 "views/controls/button/button.h"
#include "views/window/non_client_view.h"
@@ -27,7 +27,7 @@ class ImageView;
}
class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::ButtonListener,
public TabIconView::TabIconViewModel {
public:
@@ -98,10 +98,10 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual SkBitmap GetFaviconForTabIconView() OVERRIDE;
protected:
- // 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;
private:
// Returns the thickness of the border that makes up the window frame edges.
@@ -187,7 +187,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
// icon.
scoped_ptr<AvatarMenuButton> avatar_button_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
};
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index 07b827e..116795d 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -10,9 +10,9 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/views/window.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_source.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "views/events/event.h"
@@ -248,25 +248,25 @@ void HtmlDialogView::InitDialog() {
notification_registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
DOMView::LoadURL(GetDialogContentURL());
}
void HtmlDialogView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
- RenderWidgetHost* rwh = Details<RenderWidgetHost>(details).ptr();
+ RenderWidgetHost* rwh = content::Details<RenderWidgetHost>(details).ptr();
notification_registrar_.Add(
this,
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- Source<RenderWidgetHost>(rwh));
+ content::Source<RenderWidgetHost>(rwh));
break;
}
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME:
diff --git a/chrome/browser/ui/views/html_dialog_view.h b/chrome/browser/ui/views/html_dialog_view.h
index f75e0dd..da8c3ad 100644
--- a/chrome/browser/ui/views/html_dialog_view.h
+++ b/chrome/browser/ui/views/html_dialog_view.h
@@ -13,8 +13,8 @@
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
#include "chrome/browser/ui/webui/html_dialog_ui.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/size.h"
#include "views/widget/widget_delegate.h"
@@ -38,7 +38,7 @@ class HtmlDialogView
public HtmlDialogTabContentsDelegate,
public HtmlDialogUIDelegate,
public views::WidgetDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
HtmlDialogView(Profile* profile, HtmlDialogUIDelegate* delegate);
virtual ~HtmlDialogView();
@@ -84,10 +84,10 @@ class HtmlDialogView
OVERRIDE;
virtual void CloseContents(TabContents* source) OVERRIDE;
- // 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;
protected:
// Register accelerators for this dialog.
@@ -115,7 +115,7 @@ class HtmlDialogView
// using this variable.
HtmlDialogUIDelegate* delegate_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(HtmlDialogView);
};
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 7aaa461..723c05c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -337,7 +337,7 @@ void LocationBarView::UpdatePageActions() {
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());
}
@@ -351,7 +351,7 @@ void LocationBarView::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());
}
}
@@ -997,8 +997,8 @@ void LocationBarView::RefreshPageActionViews() {
old_visibility[action] != (*i)->IsVisible()) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
- Source<ExtensionAction>(action),
- Details<TabContents>(contents));
+ content::Source<ExtensionAction>(action),
+ content::Details<TabContents>(contents));
}
}
}
@@ -1257,10 +1257,10 @@ void LocationBarView::OnTemplateURLServiceChanged() {
}
void LocationBarView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* name = Details<std::string>(details).ptr();
+ std::string* name = content::Details<std::string>(details).ptr();
if (*name == prefs::kEditBookmarksEnabled)
Update(NULL);
}
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index f2c5f01..4524234 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -73,7 +73,7 @@ class LocationBarView : public LocationBar,
public AutocompleteEditController,
public DropdownBarHostDelegate,
public TemplateURLServiceObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
@@ -264,10 +264,10 @@ class LocationBarView : public LocationBar,
// Overridden from TemplateURLServiceObserver
virtual void OnTemplateURLServiceChanged() OVERRIDE;
- // 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;
// Thickness of the left and right edges of the omnibox, in normal mode.
static const int kNormalHorizontalEdgeThickness;
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index bfab4ca..15487e1 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -19,8 +19,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.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 "content/public/browser/notification_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -379,7 +379,7 @@ void BalloonViewImpl::Show(Balloon* balloon) {
notification_registrar_.Add(
this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
- Source<Balloon>(balloon));
+ content::Source<Balloon>(balloon));
}
void BalloonViewImpl::CreateOptionsMenu() {
@@ -503,8 +503,8 @@ void BalloonViewImpl::OnBoundsChanged(const gfx::Rect& previous_bounds) {
}
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) {
NOTREACHED();
return;
@@ -514,6 +514,6 @@ void BalloonViewImpl::Observe(int type,
// (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);
}
diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h
index 83393dd..979814a 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.h
+++ b/chrome/browser/ui/views/notifications/balloon_view.h
@@ -13,7 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/ui/views/notifications/balloon_view_host.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/path.h"
#include "ui/gfx/point.h"
@@ -26,9 +26,7 @@
#include "views/widget/widget_delegate.h"
class BalloonCollection;
-class NotificationDetails;
class NotificationOptionsMenuModel;
-class NotificationSource;
namespace ui {
class SlideAnimation;
@@ -48,7 +46,7 @@ class BalloonViewImpl : public BalloonView,
public views::ViewMenuDelegate,
public views::WidgetDelegateView,
public views::ButtonListener,
- public NotificationObserver,
+ public content::NotificationObserver,
public ui::AnimationDelegate {
public:
explicit BalloonViewImpl(BalloonCollection* collection);
@@ -79,10 +77,10 @@ class BalloonViewImpl : public BalloonView,
virtual void ButtonPressed(
views::Button* sender, const views::Event&) OVERRIDE;
- // NotificationObserver interface.
+ // content::NotificationObserver interface.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// ui::AnimationDelegate interface.
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
@@ -159,7 +157,7 @@ class BalloonViewImpl : public BalloonView,
scoped_ptr<views::MenuRunner> menu_runner_;
views::MenuButton* options_menu_button_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl);
};
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index d8988d1..a7b9408 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -592,11 +592,11 @@ int OmniboxViewViews::OnPerformDrop(const views::DropTargetEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// OmniboxViewViews, NotificationObserver implementation:
+// OmniboxViewViews, content::NotificationObserver implementation:
void OmniboxViewViews::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/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 3af1349..2db5ed3 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -13,7 +13,7 @@
#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/public/browser/notification_observer.h"
#include "ui/base/range/range.h"
#include "views/controls/textfield/textfield_controller.h"
#include "views/view.h"
@@ -35,7 +35,7 @@ class TabContents;
// Instant.
class OmniboxViewViews : public views::View,
public OmniboxView,
- public NotificationObserver,
+ public content::NotificationObserver,
public views::TextfieldController {
public:
// The internal view class name.
@@ -124,10 +124,10 @@ class OmniboxViewViews : public views::View,
virtual views::View* AddToView(views::View* parent) OVERRIDE;
virtual int OnPerformDrop(const views::DropTargetEvent& event) 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;
// views::TextfieldController:
virtual void ContentsChanged(views::Textfield* sender,
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
index 26983ac..0bbf679 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
@@ -10,8 +10,8 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.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 "content/public/browser/notification_types.h"
#include "ui/base/accessibility/accessible_view_state.h"
@@ -63,18 +63,19 @@ void TabContentsContainer::SetReservedContentsRect(
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsContainer, NotificationObserver implementation:
+// TabContentsContainer, content::NotificationObserver implementation:
-void TabContentsContainer::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void TabContentsContainer::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
RenderViewHostSwitchedDetails* switched_details =
- Details<RenderViewHostSwitchedDetails>(details).ptr();
+ content::Details<RenderViewHostSwitchedDetails>(details).ptr();
RenderViewHostChanged(switched_details->old_host,
switched_details->new_host);
} else if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
- TabContentsDestroyed(Source<TabContents>(source).ptr());
+ TabContentsDestroyed(content::Source<TabContents>(source).ptr());
} else {
NOTREACHED();
}
@@ -152,13 +153,15 @@ void TabContentsContainer::AddObservers() {
// TabContents can change their RenderViewHost and hence the HWND that is
// shown and getting focused. We need to keep track of that so we install
// the focus subclass on the shown HWND so we intercept focus change events.
- registrar_.Add(this,
- content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&tab_contents_->controller()));
-
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents_));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ content::Source<NavigationController>(&tab_contents_->controller()));
+
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(tab_contents_));
}
void TabContentsContainer::RemoveObservers() {
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.h b/chrome/browser/ui/views/tab_contents/tab_contents_container.h
index e864bc5..ef96561 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container.h
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.h
@@ -7,8 +7,8 @@
#pragma once
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.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 "views/view.h"
class NativeTabContentsContainer;
@@ -17,7 +17,7 @@ class RenderWidgetHostView;
class TabContents;
class TabContentsContainer : public views::View,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TabContentsContainer();
virtual ~TabContentsContainer();
@@ -41,10 +41,10 @@ class TabContentsContainer : public views::View,
// should not be rendered to draw the resize corner, sidebar mini tabs etc.
void SetReservedContentsRect(const gfx::Rect& reserved_rect);
- // 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 views::View:
virtual void Layout() OVERRIDE;
@@ -84,7 +84,7 @@ class TabContentsContainer : public views::View,
TabContents* tab_contents_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The current reserved rect in view coordinates where contents should not be
// rendered to draw the resize corner, sidebar mini tabs etc.
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
index 10674fd..a657106 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc
@@ -14,8 +14,8 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.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"
// Some of this class is implemented in tab_contents_container.cc, where
// the implementation doesn't vary between a pure views approach and a
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
index f6b5bc1..9e56d32 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container_native.h
@@ -7,8 +7,8 @@
#pragma once
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.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 "views/view.h"
class NativeTabContentsContainer;
@@ -17,7 +17,7 @@ class RenderWidgetHostView;
class TabContents;
class TabContentsContainer : public views::View,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
TabContentsContainer();
virtual ~TabContentsContainer();
@@ -41,10 +41,10 @@ class TabContentsContainer : public views::View,
// should not be rendered to draw the resize corner, sidebar mini tabs etc.
void SetReservedContentsRect(const gfx::Rect& reserved_rect);
- // 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 views::View:
virtual void Layout() OVERRIDE;
@@ -84,7 +84,7 @@ class TabContentsContainer : public views::View,
TabContents* tab_contents_;
// Handles registering for our notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The current reserved rect in view coordinates where contents should not be
// rendered to draw the resize corner, sidebar mini tabs etc.
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 8cadbb8..6bfd318 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -396,10 +396,11 @@ void BrowserTabStripController::TabBlockedStateChanged(
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserTabStripController, NotificationObserver implementation:
+// BrowserTabStripController, content::NotificationObserver implementation:
void BrowserTabStripController::Observe(int type,
- const NotificationSource& source, const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED);
// Note that this notification may be fired during a model mutation and
// possibly before the tabstrip has processed the change.
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
index e2085e4..7d43e42 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
@@ -10,8 +10,8 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/hover_tab_selector.h"
#include "chrome/browser/ui/views/tabs/tab_strip_controller.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"
class BaseTab;
class BaseTabStrip;
@@ -24,7 +24,7 @@ struct TabRendererData;
// TabContentsWrappers in a TabStripModel.
class BrowserTabStripController : public TabStripController,
public TabStripModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
BrowserTabStripController(Browser* browser, TabStripModel* model);
virtual ~BrowserTabStripController();
@@ -90,10 +90,10 @@ class BrowserTabStripController : public TabStripController,
virtual void TabBlockedStateChanged(TabContentsWrapper* contents,
int model_index) OVERRIDE;
- // 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;
protected:
// The context in which SetTabRendererDataFromModel is being called.
@@ -137,7 +137,7 @@ class BrowserTabStripController : public TabStripController,
// If non-NULL it means we're showing a menu for the tab.
scoped_ptr<TabContextMenuContents> context_menu_contents_;
- NotificationRegistrar notification_registrar_;
+ content::NotificationRegistrar notification_registrar_;
// Helper for performing tab selection as a result of dragging over a tab.
HoverTabSelector hover_tab_selector_;
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 7beb19d..317931f 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -23,8 +23,8 @@
#include "chrome/browser/ui/views/tabs/tab_strip.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_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -390,9 +390,10 @@ void DraggedTabController::InitTabDragData(BaseTab* tab,
drag_data->contents = GetModel(source_tabstrip_)->GetTabContentsAt(
drag_data->source_model_index);
drag_data->pinned = source_tabstrip_->IsTabPinned(tab);
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(drag_data->contents->tab_contents()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ content::Source<TabContents>(drag_data->contents->tab_contents()));
// We need to be the delegate so we receive messages about stuff, otherwise
// our dragged TabContents may be replaced and subsequently
@@ -474,13 +475,14 @@ DraggedTabController::GetJavaScriptDialogCreator() {
}
///////////////////////////////////////////////////////////////////////////////
-// DraggedTabController, NotificationObserver implementation:
+// DraggedTabController, content::NotificationObserver implementation:
-void DraggedTabController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void DraggedTabController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(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_[i].contents->tab_contents() == destroyed_contents) {
// One of the tabs we're dragging has been destroyed. Cancel the drag.
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.h b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
index ed50e6e..3c0827e 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.h
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
@@ -14,8 +14,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.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/gfx/rect.h"
namespace views {
@@ -40,7 +40,7 @@ struct TabRendererData;
//
///////////////////////////////////////////////////////////////////////////////
class DraggedTabController : public TabContentsDelegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public MessageLoopForUI::Observer {
public:
DraggedTabController();
@@ -148,10 +148,10 @@ class DraggedTabController : public TabContentsDelegate,
virtual content::JavaScriptDialogCreator*
GetJavaScriptDialogCreator() OVERRIDE;
- // 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 MessageLoop::Observer:
#if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA)
@@ -295,7 +295,7 @@ class DraggedTabController : public TabContentsDelegate,
TabStripModel* GetModel(BaseTabStrip* tabstrip) const;
// Handles registering for notifications.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// The TabStrip the drag originated from.
BaseTabStrip* source_tabstrip_;
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index 79c52e3..d4824d2 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -157,9 +157,10 @@ void ThemeInstallBubbleView::Close() {
}
}
-void ThemeInstallBubbleView::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void ThemeInstallBubbleView::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
Close();
}
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.h b/chrome/browser/ui/views/theme_install_bubble_view.h
index 08aacc8..fbcb5e7 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.h
+++ b/chrome/browser/ui/views/theme_install_bubble_view.h
@@ -7,8 +7,8 @@
#pragma once
#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 "ui/gfx/canvas.h"
#include "views/controls/label.h"
@@ -31,15 +31,15 @@ class Widget;
// between install begin and theme caching seizing the UI thread), the loading
// bubble will only appear over the first window, as there is only ever one
// instance of the bubble.
-class ThemeInstallBubbleView : public NotificationObserver,
+class ThemeInstallBubbleView : public content::NotificationObserver,
public views::Label {
public:
virtual ~ThemeInstallBubbleView();
- // NotificationObserver
+ // content::NotificationObserver
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
// Show the loading bubble.
static void Show(TabContents* tab_contents);
@@ -68,7 +68,7 @@ class ThemeInstallBubbleView : public NotificationObserver,
string16 text_;
// A scoped container for notification registries.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ThemeInstallBubbleView);
};
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 207d093..f51ba3f 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -124,7 +124,7 @@ ToolbarView::ToolbarView(Browser* browser)
chrome::NOTIFICATION_MODULE_INCOMPATIBILITY_BADGE_CHANGE,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(browser_->profile()));
+ content::Source<Profile>(browser_->profile()));
}
ToolbarView::~ToolbarView() {
@@ -407,14 +407,14 @@ void ToolbarView::ButtonPressed(views::Button* sender,
}
////////////////////////////////////////////////////////////////////////////////
-// ToolbarView, NotificationObserver implementation:
+// ToolbarView, content::NotificationObserver implementation:
void ToolbarView::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::kShowHomeButton) {
Layout();
SchedulePaint();
diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h
index 096cc46..2fe61e4 100644
--- a/chrome/browser/ui/views/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar_view.h
@@ -37,7 +37,7 @@ class ToolbarView : public AccessiblePaneView,
public views::ViewMenuDelegate,
public ui::AcceleratorProvider,
public LocationBarView::Delegate,
- public NotificationObserver,
+ public content::NotificationObserver,
public CommandUpdater::CommandObserver,
public views::ButtonListener {
public:
@@ -107,10 +107,10 @@ class ToolbarView : public AccessiblePaneView,
virtual void ButtonPressed(views::Button* sender, const views::Event& event)
OVERRIDE;
- // 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::AcceleratorProvider:
virtual bool GetAcceleratorForCommandId(
@@ -209,7 +209,7 @@ class ToolbarView : public AccessiblePaneView,
// A list of listeners to call when the menu opens.
ObserverList<views::MenuListener> menu_listeners_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
};
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index 03dab34..8748d9c 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -19,9 +19,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -380,7 +380,7 @@ static const int kZoomPadding = 6;
// the zoom, a label showing the current zoom percent, and a button to go
// full-screen.
class WrenchMenu::ZoomView : public WrenchMenuView,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
ZoomView(WrenchMenu* menu,
MenuModel* menu_model,
@@ -440,7 +440,8 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
registrar_.Add(
this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
- Source<HostZoomMap>(menu->browser_->profile()->GetHostZoomMap()));
+ content::Source<HostZoomMap>(
+ menu->browser_->profile()->GetHostZoomMap()));
}
gfx::Size GetPreferredSize() {
@@ -488,10 +489,10 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
}
}
- // NotificationObserver:
+ // content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK_EQ(content::NOTIFICATION_ZOOM_LEVEL_CHANGED, type);
UpdateZoomControls();
}
@@ -543,7 +544,7 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
// Index of the fullscreen menu item in the model.
const int fullscreen_index_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Button for incrementing the zoom.
TextButton* increment_button_;
@@ -572,7 +573,7 @@ WrenchMenu::WrenchMenu(Browser* browser)
bookmark_menu_(NULL),
first_bookmark_command_id_(0) {
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED,
- Source<Profile>(browser_->profile()));
+ content::Source<Profile>(browser_->profile()));
}
WrenchMenu::~WrenchMenu() {
@@ -776,8 +777,8 @@ void WrenchMenu::BookmarkModelChanged() {
void WrenchMenu::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED:
// A change in the global errors list can add or remove items from the
diff --git a/chrome/browser/ui/views/wrench_menu.h b/chrome/browser/ui/views/wrench_menu.h
index 469c67f..6f08b91 100644
--- a/chrome/browser/ui/views/wrench_menu.h
+++ b/chrome/browser/ui/views/wrench_menu.h
@@ -11,8 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/base_bookmark_model_observer.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/models/menu_model.h"
#include "views/controls/menu/menu_delegate.h"
@@ -29,7 +29,7 @@ class View;
// WrenchMenu adapts the WrenchMenuModel to view's menu related classes.
class WrenchMenu : public views::MenuDelegate,
public BaseBookmarkModelObserver,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
explicit WrenchMenu(Browser* browser);
virtual ~WrenchMenu();
@@ -74,10 +74,10 @@ class WrenchMenu : public views::MenuDelegate,
// BaseBookmarkModelObserver overrides:
virtual void BookmarkModelChanged() OVERRIDE;
- // NotificationObserver overrides:
+ // content::NotificationObserver overrides:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
class CutCopyPasteView;
@@ -142,7 +142,7 @@ class WrenchMenu : public views::MenuDelegate,
// ID to use for the items representing bookmarks in the bookmark menu.
int first_bookmark_command_id_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(WrenchMenu);
};