summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:49:04 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:49:04 +0000
commit0d5d44b1e5043239085de5e5ea9ca4d6854bce45 (patch)
tree6bb5d458366e7975c8820efbc6f21b660d583321 /chrome/renderer
parent58b48978267e72777344231c4680e68aa94c6add (diff)
downloadchromium_src-0d5d44b1e5043239085de5e5ea9ca4d6854bce45.zip
chromium_src-0d5d44b1e5043239085de5e5ea9ca4d6854bce45.tar.gz
chromium_src-0d5d44b1e5043239085de5e5ea9ca4d6854bce45.tar.bz2
Allow experimental extension pop-ups from infobars.
BUG=none TEST=browser_tests.exe --gtest_filter=*PopupFromInfobar* Review URL: http://codereview.chromium.org/3127037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58442 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/extensions/extension_process_bindings.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/renderer/extensions/extension_process_bindings.cc b/chrome/renderer/extensions/extension_process_bindings.cc
index 340502f..ecbdbf2 100644
--- a/chrome/renderer/extensions/extension_process_bindings.cc
+++ b/chrome/renderer/extensions/extension_process_bindings.cc
@@ -276,6 +276,7 @@ class ExtensionImpl : public ExtensionBase {
return v8::Undefined();
if (viewtype_to_find != ViewType::EXTENSION_POPUP &&
+ viewtype_to_find != ViewType::EXTENSION_INFOBAR &&
viewtype_to_find != ViewType::TAB_CONTENTS) {
NOTREACHED() << "Requesting invalid view type.";
}
@@ -311,7 +312,11 @@ class ExtensionImpl : public ExtensionBase {
}
static v8::Handle<v8::Value> GetPopupParentWindow(const v8::Arguments& args) {
- return PopupViewFinder(args, ViewType::TAB_CONTENTS);
+ v8::Handle<v8::Value> view = PopupViewFinder(args, ViewType::TAB_CONTENTS);
+ if (view == v8::Undefined()) {
+ view = PopupViewFinder(args, ViewType::EXTENSION_INFOBAR);
+ }
+ return view;
}
static v8::Handle<v8::Value> GetExtensionViews(const v8::Arguments& args) {