From 5e34e783538b49c9ad1c67ef0296e88803c340c2 Mon Sep 17 00:00:00 2001 From: "jamiewalch@chromium.org" Date: Thu, 15 May 2014 20:36:26 +0000 Subject: Fix installer download for apps v2. This is a poor-man's solution to unblock the apps v2 release. It causes an existing Chrome window (or a new one if there aren't any) to download the installer. This is needed because the v2 app doesn't have a brower context, which means no download shelf for the user to click when the download completes. The UX is pretty horrible because the Chrome window pops on top of the app window, typically obscuring the instructions. I'm open to better solutions. This also fixes a bug in the host setup and install dialogs, which were not showing the translucent screen that normally obscures the main UI while a modal dialog is open. Review URL: https://codereview.chromium.org/282113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270802 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/webapp/host_install_dialog.js | 9 +++++++-- remoting/webapp/html/template_main.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'remoting') diff --git a/remoting/webapp/host_install_dialog.js b/remoting/webapp/host_install_dialog.js index f94cca6..71bf84d 100644 --- a/remoting/webapp/host_install_dialog.js +++ b/remoting/webapp/host_install_dialog.js @@ -83,7 +83,13 @@ remoting.HostInstallDialog.prototype.show = function( } // Start downloading the package. - window.location = hostPackageUrl; + if (remoting.isAppsV2) { + // TODO(jamiewalch): Use chrome.downloads when it is available to + // apps v2 (http://crbug.com/174046) + window.open(hostPackageUrl); + } else { + window.location = hostPackageUrl; + } /** @type {function(remoting.HostController.AsyncResult):void} */ this.onDoneHandler_ = onDone; @@ -134,4 +140,3 @@ remoting.HostInstallDialog.prototype.onRetryClicked_ = function() { 'click', this.onCancelClickedHandler_, false); remoting.setMode(remoting.AppMode.HOST_INSTALL_PROMPT); }; - diff --git a/remoting/webapp/html/template_main.html b/remoting/webapp/html/template_main.html index 78e738e..e49551d 100644 --- a/remoting/webapp/html/template_main.html +++ b/remoting/webapp/html/template_main.html @@ -50,7 +50,7 @@ found in the LICENSE file.