diff options
Diffstat (limited to 'chrome/browser/ui/views/extensions')
6 files changed, 51 insertions, 47 deletions
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_; |