summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-18 15:22:13 +0000
committeryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-18 15:22:13 +0000
commit457b33a7ad1bfbd863c4b7ed7dc902d2dbdab353 (patch)
tree842d5dbaba0088a40d97f3c8b885342dbf47d8fb
parentfa6ad1deb9aa8b81ef3b11ba54174d874c2ab3b8 (diff)
downloadchromium_src-457b33a7ad1bfbd863c4b7ed7dc902d2dbdab353.zip
chromium_src-457b33a7ad1bfbd863c4b7ed7dc902d2dbdab353.tar.gz
chromium_src-457b33a7ad1bfbd863c4b7ed7dc902d2dbdab353.tar.bz2
[Files.app] Support 'newwindow' event from the CWS widget
Suggest app dialog have to support 'newwindow' event from the CWS widget, as well as share dialog. This is reland of r220514. BUG=none TEST=manual TBR=hirono@chromium.org Review URL: https://chromiumcodereview.appspot.com/23535008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223875 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/file_manager/js/suggest_apps_dialog.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
index 43f2851..076d189 100644
--- a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
+++ b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
@@ -270,6 +270,12 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
this.authorizeRequest_.bind(this),
{urls: [this.widgetOrigin_ + '/*']},
['blocking', 'requestHeaders']);
+ this.webview_.addEventListener('newwindow', function(event) {
+ // Discard the window object and reopen in an external window.
+ event.window.discard();
+ util.visitURL(event.targetUrl);
+ event.preventDefault();
+ });
this.frame_.classList.add('show-spinner');