OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * | 7 * |
8 * HostInstaller allows the caller to download the host binary and monitor the | 8 * HostInstaller allows the caller to download the host binary and monitor the |
9 * install progress of the host by pinging the host periodically via native | 9 * install progress of the host by pinging the host periodically via native |
10 * messaging. | 10 * messaging. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 port.onMessage.removeListener(onMessage); | 73 port.onMessage.removeListener(onMessage); |
74 resolve(false); | 74 resolve(false); |
75 } | 75 } |
76 | 76 |
77 port.onDisconnect.addListener(onDisconnected); | 77 port.onDisconnect.addListener(onDisconnected); |
78 port.onMessage.addListener(onMessage); | 78 port.onMessage.addListener(onMessage); |
79 port.postMessage({type: 'hello'}); | 79 port.postMessage({type: 'hello'}); |
80 }); | 80 }); |
81 }; | 81 }; |
82 | 82 |
83 /** @type {Object.<string,string>} */ | 83 /** @type {Object<string,string>} */ |
84 var HOST_DOWNLOAD_URLS = { | 84 var HOST_DOWNLOAD_URLS = { |
85 'Win32': 'http://dl.google.com/dl/edgedl/chrome-remote-desktop/' + | 85 'Win32': 'http://dl.google.com/dl/edgedl/chrome-remote-desktop/' + |
86 'chromeremotedesktophost.msi', | 86 'chromeremotedesktophost.msi', |
87 'Win64': 'http://dl.google.com/dl/edgedl/chrome-remote-desktop/' + | 87 'Win64': 'http://dl.google.com/dl/edgedl/chrome-remote-desktop/' + |
88 'chromeremotedesktophost.msi', | 88 'chromeremotedesktophost.msi', |
89 'MacIntel': 'https://dl.google.com/chrome-remote-desktop/' + | 89 'MacIntel': 'https://dl.google.com/chrome-remote-desktop/' + |
90 'chromeremotedesktop.dmg', | 90 'chromeremotedesktop.dmg', |
91 'Linux x86_64': 'https://dl.google.com/linux/direct/' + | 91 'Linux x86_64': 'https://dl.google.com/linux/direct/' + |
92 'chrome-remote-desktop_current_amd64.deb', | 92 'chrome-remote-desktop_current_amd64.deb', |
93 'Linux i386': 'https://dl.google.com/linux/direct/' + | 93 'Linux i386': 'https://dl.google.com/linux/direct/' + |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 */ | 171 */ |
172 remoting.HostInstaller.prototype.cancel = function() { | 172 remoting.HostInstaller.prototype.cancel = function() { |
173 if (this.checkInstallIntervalId_ !== null) { | 173 if (this.checkInstallIntervalId_ !== null) { |
174 window.clearInterval(this.checkInstallIntervalId_); | 174 window.clearInterval(this.checkInstallIntervalId_); |
175 this.checkInstallIntervalId_ = null; | 175 this.checkInstallIntervalId_ = null; |
176 } | 176 } |
177 this.downloadAndWaitForInstallPromise_ = null; | 177 this.downloadAndWaitForInstallPromise_ = null; |
178 }; | 178 }; |
179 | 179 |
180 })(); | 180 })(); |
OLD | NEW |