summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_view.h
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 15:46:41 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 15:46:41 +0000
commit8830998f7436edb5aabd1a3465d7ba5e7b77fd05 (patch)
tree7d90b836f05d2b01b1a68b053aeab068efa73501 /chrome/browser/extensions/extension_view.h
parent0d34712130aaa3982dabb0a34e96a2be85a5f2e1 (diff)
downloadchromium_src-8830998f7436edb5aabd1a3465d7ba5e7b77fd05.zip
chromium_src-8830998f7436edb5aabd1a3465d7ba5e7b77fd05.tar.gz
chromium_src-8830998f7436edb5aabd1a3465d7ba5e7b77fd05.tar.bz2
Hook up a bit more plumbing to ExtensionView which should allow popup windows and widgets to work.Add in a quick hack that lets you bring up the web inspector.
Review URL: http://codereview.chromium.org/67029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_view.h')
-rwxr-xr-xchrome/browser/extensions/extension_view.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_view.h b/chrome/browser/extensions/extension_view.h
index 09c7788..7c11371 100755
--- a/chrome/browser/extensions/extension_view.h
+++ b/chrome/browser/extensions/extension_view.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
+#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
// TODO(port): Port these files.
#if defined(OS_WIN)
@@ -14,7 +15,11 @@
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
+class Browser;
class Extension;
+class RenderWidgetHost;
+class RenderWidgetHostView;
+class WebContents;
struct WebPreferences;
// This class is the browser component of an extension component's RenderView.
@@ -22,9 +27,13 @@ struct WebPreferences;
// priviliges available to extensions. The view may be drawn to the screen or
// hidden.
class ExtensionView : public HWNDHtmlView,
- public RenderViewHostDelegate {
+ public RenderViewHostDelegate,
+ public RenderViewHostDelegate::View {
public:
- ExtensionView(Extension* extension, const GURL& url, SiteInstance* instance);
+ ExtensionView(Extension* extension,
+ const GURL& url,
+ SiteInstance* instance,
+ Browser* browser);
// HWNDHtmlView
virtual void CreatingRenderer();
@@ -46,12 +55,35 @@ class ExtensionView : public HWNDHtmlView,
bool* did_suppress_message);
virtual void DidStartLoading(RenderViewHost* render_view_host,
int32 page_id);
+ virtual RenderViewHostDelegate::View* GetViewDelegate() const;
+
+ // RenderViewHostDelegate::View
+ virtual void CreateNewWindow(int route_id,
+ base::WaitableEvent* modal_dialog_event);
+ virtual void CreateNewWidget(int route_id, bool activatable);
+ virtual void ShowCreatedWindow(int route_id,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture);
+ virtual void ShowCreatedWidget(int route_id,
+ const gfx::Rect& initial_pos);
+ virtual void ShowContextMenu(const ContextMenuParams& params);
+ virtual void StartDragging(const WebDropData& drop_data);
+ virtual void UpdateDragCursor(bool is_drop_target);
+ virtual void TakeFocus(bool reverse);
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
Extension* extension() { return extension_; }
private:
// The extension that we're hosting in this view.
Extension* extension_;
+ // The browser window that this view is in.
+ Browser* browser_;
+
+ // Common implementations of some RenderViewHostDelegate::View methods.
+ RenderViewHostDelegateViewHelper delegate_view_helper_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionView);
};