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

Unified Diff: chrome/browser/resources/file_manager/js/suggest_apps_dialog.js

Issue 23737005: [Files.app] Support 'newwindow' event from the CWS widget (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
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 f827b6ea11d6797e55d53d757f26899b48186263..2591baeb1ff278cb30f4006f6098e2023393da3b 100644
--- a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
+++ b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
@@ -222,6 +222,12 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
this.authorizeRequest_.bind(this),
{urls: [this.widgetOrigin_ + '/*']},
['blocking', 'requestHeaders']);
+ webView.addEventListener('newwindow', function(e) {
hirono 2013/08/30 02:02:36 e -> event ?
+ // Discard the window object and reopen in an external window.
+ e.window.discard();
+ util.visitURL(e.targetUrl);
+ e.preventDefault();
+ });
webView.focus();
this.webviewClient_ = new CWSContainerClient(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698