Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: chrome/browser/extensions/extension_view_host.h

Issue 92743002: Extract UI dependencies from ExtensionHost, part 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase extension_view_host Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_view_host.h
diff --git a/chrome/browser/extensions/extension_view_host.h b/chrome/browser/extensions/extension_view_host.h
index aa92531cb74f6b157e74100bb0770c5f6dda4d8d..613aa7cffd4ec4e099c73e7862e67b64caf797e4 100644
--- a/chrome/browser/extensions/extension_view_host.h
+++ b/chrome/browser/extensions/extension_view_host.h
@@ -7,6 +7,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_host.h"
+#include "components/web_modal/web_contents_modal_dialog_host.h"
+#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/ui/views/extensions/extension_view_views.h"
@@ -30,7 +32,10 @@ namespace extensions {
// The ExtensionHost for an extension that backs a view in the browser UI. For
// example, this could be an extension popup, infobar or dialog, but not a
// background page.
-class ExtensionViewHost : public ExtensionHost {
+class ExtensionViewHost
+ : public ExtensionHost,
+ public web_modal::WebContentsModalDialogManagerDelegate,
+ public web_modal::WebContentsModalDialogHost {
public:
ExtensionViewHost(const Extension* extension,
content::SiteInstance* site_instance,
@@ -70,6 +75,7 @@ class ExtensionViewHost : public ExtensionHost {
// ExtensionHost
virtual void OnDidStopLoading() OVERRIDE;
virtual void OnDocumentAvailable() OVERRIDE;
+ virtual void LoadInitialURL() OVERRIDE;
virtual bool IsBackgroundPage() const OVERRIDE;
// content::WebContentsDelegate
@@ -90,16 +96,31 @@ class ExtensionViewHost : public ExtensionHost {
virtual void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE;
-#if !defined(OS_ANDROID)
+ // web_modal::WebContentsModalDialogManagerDelegate
+ virtual web_modal::WebContentsModalDialogHost*
+ GetWebContentsModalDialogHost() OVERRIDE;
+ virtual bool IsWebContentsVisible(
+ content::WebContents* web_contents) OVERRIDE;
+
// web_modal::WebContentsModalDialogHost
virtual gfx::NativeView GetHostView() const OVERRIDE;
-#endif
+ virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE;
+ virtual gfx::Size GetMaximumDialogSize() OVERRIDE;
+ virtual void AddObserver(
+ web_modal::ModalDialogHostObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(
+ web_modal::ModalDialogHostObserver* observer) OVERRIDE;
// ExtensionFunctionDispatcher::Delegate
virtual WindowController* GetExtensionWindowController() const OVERRIDE;
virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
virtual content::WebContents* GetVisibleWebContents() const OVERRIDE;
+ // content::NotificationObserver
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
private:
// Insert a default style sheet for Extension Infobars.
void InsertInfobarCSS();
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698