summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:36:26 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:36:26 +0000
commit5e34e783538b49c9ad1c67ef0296e88803c340c2 (patch)
treef7d834bd60c372b84912872ad34bd79bcc506874
parent38be420f6c40d226438d85ff088e334ed1b2f4a8 (diff)
downloadchromium_src-5e34e783538b49c9ad1c67ef0296e88803c340c2.zip
chromium_src-5e34e783538b49c9ad1c67ef0296e88803c340c2.tar.gz
chromium_src-5e34e783538b49c9ad1c67ef0296e88803c340c2.tar.bz2
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
-rw-r--r--remoting/webapp/host_install_dialog.js9
-rw-r--r--remoting/webapp/html/template_main.html2
2 files changed, 8 insertions, 3 deletions
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.
<meta-include src="webapp/html/dialog_auth.html"/>
<div class="dialog-screen"
- data-ui-mode="home.host home.client home.history home.confirm-host-delete home.host-setup home.token-refresh-failed home.manage-pairings"
+ data-ui-mode="home.host home.client home.history home.confirm-host-delete home.host-setup home.token-refresh-failed home.manage-pairings home.host-setup home.host-install"
hidden></div>
<div class="dialog-container"