summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 17:03:12 +0000
committerjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 17:03:12 +0000
commit3e2b375b56172a400f75060bd2a827375ea44fea (patch)
tree59f9864d0cf85c5901d686e3757940f8db561328 /chrome/browser/extensions
parent0d0524fea0ce2adb9aa132f90b63c7deb5410b1f (diff)
downloadchromium_src-3e2b375b56172a400f75060bd2a827375ea44fea.zip
chromium_src-3e2b375b56172a400f75060bd2a827375ea44fea.tar.gz
chromium_src-3e2b375b56172a400f75060bd2a827375ea44fea.tar.bz2
Adding the new WebPopupType to the RenderWidget creation.
BUG=None TEST=Tests that all popups (select popup, autofill, browser actions, bookmark bubble...) work as expected and get the focus correctly. Review URL: http://codereview.chromium.org/1523013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_host.cc11
-rw-r--r--chrome/browser/extensions/extension_host.h7
-rw-r--r--chrome/browser/extensions/extension_host_mac.h5
-rw-r--r--chrome/browser/extensions/extension_host_mac.mm4
4 files changed, 15 insertions, 12 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index eb3a334..7e15d48 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -548,13 +548,14 @@ void ExtensionHost::CreateNewWindow(int route_id) {
site_instance(), DOMUIFactory::GetDOMUIType(url_), NULL);
}
-void ExtensionHost::CreateNewWidget(int route_id, bool activatable) {
- CreateNewWidgetInternal(route_id, activatable);
+void ExtensionHost::CreateNewWidget(int route_id,
+ WebKit::WebPopupType popup_type) {
+ CreateNewWidgetInternal(route_id, popup_type);
}
-RenderWidgetHostView* ExtensionHost::CreateNewWidgetInternal(int route_id,
- bool activatable) {
- return delegate_view_helper_.CreateNewWidget(route_id, activatable,
+RenderWidgetHostView* ExtensionHost::CreateNewWidgetInternal(
+ int route_id, WebKit::WebPopupType popup_type) {
+ return delegate_view_helper_.CreateNewWidget(route_id, popup_type,
site_instance()->GetProcess());
}
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 4d6ca59..f30593c 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -135,7 +135,7 @@ class ExtensionHost : public RenderViewHostDelegate,
// RenderViewHostDelegate::View
virtual void CreateNewWindow(int route_id);
- virtual void CreateNewWidget(int route_id, bool activatable);
+ virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type);
virtual void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
@@ -183,8 +183,9 @@ class ExtensionHost : public RenderViewHostDelegate,
// associated with the given route. When the widget needs to be shown later,
// we'll look it up again and pass the object to the Show functions rather
// than the route ID.
- virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id,
- bool activatable);
+ virtual RenderWidgetHostView* CreateNewWidgetInternal(
+ int route_id,
+ WebKit::WebPopupType popup_type);
virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view,
const gfx::Rect& initial_pos);
private:
diff --git a/chrome/browser/extensions/extension_host_mac.h b/chrome/browser/extensions/extension_host_mac.h
index 6a97e62..1bdbcfc 100644
--- a/chrome/browser/extensions/extension_host_mac.h
+++ b/chrome/browser/extensions/extension_host_mac.h
@@ -16,8 +16,9 @@ class ExtensionHostMac : public ExtensionHost {
ExtensionHost(extension, site_instance, url, host_type) {}
virtual ~ExtensionHostMac();
protected:
- virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id,
- bool activatable);
+ virtual RenderWidgetHostView* CreateNewWidgetInternal(
+ int route_id,
+ WebKit::WebPopupType popup_type);
virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view,
const gfx::Rect& initial_pos);
private:
diff --git a/chrome/browser/extensions/extension_host_mac.mm b/chrome/browser/extensions/extension_host_mac.mm
index 29d58ca..3239ebd 100644
--- a/chrome/browser/extensions/extension_host_mac.mm
+++ b/chrome/browser/extensions/extension_host_mac.mm
@@ -22,11 +22,11 @@ ExtensionHostMac::~ExtensionHostMac() {
RenderWidgetHostView* ExtensionHostMac::CreateNewWidgetInternal(
int route_id,
- bool activatable) {
+ WebKit::WebPopupType popup_type) {
// A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it
// to allow it to survive the trip without being hosed.
RenderWidgetHostView* widget_view =
- ExtensionHost::CreateNewWidgetInternal(route_id, activatable);
+ ExtensionHost::CreateNewWidgetInternal(route_id, popup_type);
RenderWidgetHostViewMac* widget_view_mac =
static_cast<RenderWidgetHostViewMac*>(widget_view);
[widget_view_mac->native_view() retain];