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

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: weak 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9d536936203d4f6fe6f3e00ba6bbfbf9cf8ac3c6 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -19,17 +19,8 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#if defined(TOOLKIT_VIEWS)
-#include "chrome/browser/ui/views/extensions/extension_view_views.h"
-#elif defined(OS_MACOSX)
-#include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
-#elif defined(TOOLKIT_GTK)
-#include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h"
-#elif defined(OS_ANDROID)
-#include "chrome/browser/ui/android/extensions/extension_view_android.h"
-#endif
-
class Browser;
+class ExtensionView;
class PrefsTabHelper;
namespace content {
@@ -54,39 +45,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
+ void SetExtensionView(ExtensionView* view);
- const PlatformExtensionView* view() const {
-#if defined(OS_ANDROID)
- NOTREACHED();
-#endif
- return view_.get();
- }
-
- PlatformExtensionView* view() {
-#if defined(OS_ANDROID)
- NOTREACHED();
-#endif
- return view_.get();
- }
+ const ExtensionView* GetExtensionView() const;
+ ExtensionView* GetExtensionView();
// 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 +176,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 !GetExtensionView(); }
// The extension that we're hosting in this view.
const Extension* extension_;
@@ -220,7 +188,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698