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

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

Issue 10913243: extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months 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
Index: chrome/browser/extensions/extension_host.h
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index f905dd69f8aac899d327adbf3b686a2beb3c1ecd..7a9489f6de2a6f1120095660b74935570f061a93 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -54,39 +54,16 @@ class ExtensionHost : public content::WebContentsDelegate,
public:
class ProcessCreationQueue;
-#if defined(TOOLKIT_VIEWS)
- typedef ExtensionViewViews PlatformExtensionView;
-#elif defined(OS_MACOSX)
- typedef ExtensionViewMac PlatformExtensionView;
-#elif defined(TOOLKIT_GTK)
- typedef ExtensionViewGtk PlatformExtensionView;
-#elif defined(OS_ANDROID)
- // Android does not support extensions.
- typedef ExtensionViewAndroid PlatformExtensionView;
-#endif
-
ExtensionHost(const Extension* extension,
content::SiteInstance* site_instance,
- const GURL& url, chrome::ViewType host_type);
+ const GURL& url,
+ chrome::ViewType host_type);
virtual ~ExtensionHost();
-#if defined(TOOLKIT_VIEWS)
- void set_view(PlatformExtensionView* view) { view_.reset(view); }
-#endif
-
- const PlatformExtensionView* view() const {
-#if defined(OS_ANDROID)
- NOTREACHED();
-#endif
- return view_.get();
- }
+ void set_extension_view(ExtensionView* view) { extension_view_.reset(view); }
- PlatformExtensionView* view() {
-#if defined(OS_ANDROID)
- NOTREACHED();
-#endif
- return view_.get();
- }
+ const ExtensionView* extension_view() const { return extension_view_.get(); }
+ ExtensionView* extension_view() { return extension_view_.get(); }
// Create an ExtensionView and tie it to this host and |browser|. Note NULL
// is a valid argument for |browser|. Extension views may be bound to
@@ -208,7 +185,7 @@ class ExtensionHost : public content::WebContentsDelegate,
// Returns true if we're hosting a background page.
// This isn't valid until CreateRenderView is called.
- bool is_background_page() const { return !view(); }
+ bool is_background_page() const { return !extension_view(); }
// The extension that we're hosting in this view.
const Extension* extension_;
@@ -220,7 +197,7 @@ class ExtensionHost : public content::WebContentsDelegate,
Profile* profile_;
// Optional view that shows the rendered content in the UI.
- scoped_ptr<PlatformExtensionView> view_;
+ scoped_ptr<ExtensionView> extension_view_;
// Used to create dialog boxes.
// It must outlive host_contents_ as host_contents_ will access it
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | chrome/browser/ui/views/infobars/extension_infobar.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698