| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Type definition for the RunApplicationResponse returned by the API. | 9 * Type definition for the RunApplicationResponse returned by the API. |
| 10 * @typedef {{ | 10 * @typedef {{ |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 remoting.Error.fromHttpStatus(xhrResponse.status); | 154 remoting.Error.fromHttpStatus(xhrResponse.status); |
| 155 this.onConnectionFailed(error); | 155 this.onConnectionFailed(error); |
| 156 } | 156 } |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 /** | 159 /** |
| 160 * @param {remoting.ConnectionInfo} connectionInfo | 160 * @param {remoting.ConnectionInfo} connectionInfo |
| 161 */ | 161 */ |
| 162 remoting.AppRemotingActivity.prototype.onConnected = function(connectionInfo) { | 162 remoting.AppRemotingActivity.prototype.onConnected = function(connectionInfo) { |
| 163 this.connectedView_ = new remoting.AppConnectedView( | 163 this.connectedView_ = new remoting.AppConnectedView( |
| 164 document.getElementById('client-container'), connectionInfo); | 164 document.getElementById('client-container'), |
| 165 connectionInfo, |
| 166 this.session_); |
| 165 | 167 |
| 166 var idleDetector = new remoting.IdleDetector( | 168 var idleDetector = new remoting.IdleDetector( |
| 167 document.getElementById('idle-dialog'), this.stop.bind(this)); | 169 document.getElementById('idle-dialog'), this.stop.bind(this)); |
| 168 | 170 |
| 169 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard | 171 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard |
| 170 // shortcuts, but we want them to act as natively as possible. | 172 // shortcuts, but we want them to act as natively as possible. |
| 171 if (remoting.platformIsMac()) { | 173 if (remoting.platformIsMac()) { |
| 172 connectionInfo.plugin().setRemapKeys('0x0700e3>0x0700e0,0x0700e7>0x0700e4'); | 174 connectionInfo.plugin().setRemapKeys('0x0700e3>0x0700e0,0x0700e7>0x0700e4'); |
| 173 } | 175 } |
| 174 }; | 176 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 199 * @private | 201 * @private |
| 200 */ | 202 */ |
| 201 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { | 203 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { |
| 202 console.error('Connection failed: ' + error.toString()); | 204 console.error('Connection failed: ' + error.toString()); |
| 203 remoting.MessageWindow.showErrorMessage( | 205 remoting.MessageWindow.showErrorMessage( |
| 204 remoting.app.getApplicationName(), | 206 remoting.app.getApplicationName(), |
| 205 chrome.i18n.getMessage(error.getTag())); | 207 chrome.i18n.getMessage(error.getTag())); |
| 206 }; | 208 }; |
| 207 | 209 |
| 208 })(); | 210 })(); |
| OLD | NEW |