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

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: addressed comment 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 a18994a8093ee56c2c43a8118301332fa4cf5662..2fbdde17d65ceccb25d7a86519666c076e509b07 100644
--- a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
+++ b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
@@ -225,6 +225,12 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
this.authorizeRequest_.bind(this),
{urls: [this.widgetOrigin_ + '/*']},
['blocking', 'requestHeaders']);
+ webview.addEventListener('newwindow', function(event) {
+ // Discard the window object and reopen in an external window.
+ event.window.discard();
+ util.visitURL(e.targetUrl);
+ event.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