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 * This class implements the functionality that is specific to application | 7 * This class implements the functionality that is specific to application |
8 * remoting ("AppRemoting" or AR). | 8 * remoting ("AppRemoting" or AR). |
9 */ | 9 */ |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 remoting.AppRemoting.prototype.onConnected_ = function(connectionInfo) { | 207 remoting.AppRemoting.prototype.onConnected_ = function(connectionInfo) { |
208 this.initSession_(connectionInfo); | 208 this.initSession_(connectionInfo); |
209 | 209 |
210 remoting.identity.getUserInfo().then( | 210 remoting.identity.getUserInfo().then( |
211 function(userInfo) { | 211 function(userInfo) { |
212 remoting.clientSession.sendClientMessage( | 212 remoting.clientSession.sendClientMessage( |
213 'setUserDisplayInfo', | 213 'setUserDisplayInfo', |
214 JSON.stringify({fullName: userInfo.name})); | 214 JSON.stringify({fullName: userInfo.name})); |
215 }); | 215 }); |
216 | 216 |
217 this.sessionConnector_.registerProtocolExtension(this); | 217 connectionInfo.plugin().extensions().register(this); |
218 | 218 |
219 this.connectedView_ = new remoting.AppConnectedView( | 219 this.connectedView_ = new remoting.AppConnectedView( |
220 document.getElementById('client-container'), connectionInfo); | 220 document.getElementById('client-container'), connectionInfo); |
221 | 221 |
222 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard | 222 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard |
223 // shortcuts, but we want them to act as natively as possible. | 223 // shortcuts, but we want them to act as natively as possible. |
224 if (remoting.platformIsMac()) { | 224 if (remoting.platformIsMac()) { |
225 connectionInfo.plugin().setRemapKeys('0x0700e3>0x0700e0,0x0700e7>0x0700e4'); | 225 connectionInfo.plugin().setRemapKeys('0x0700e3>0x0700e0,0x0700e7>0x0700e4'); |
226 } | 226 } |
227 }; | 227 }; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 }; | 327 }; |
328 | 328 |
329 /** | 329 /** |
330 * @return {string} | 330 * @return {string} |
331 * @private | 331 * @private |
332 */ | 332 */ |
333 remoting.AppRemoting.prototype.runApplicationUrl_ = function() { | 333 remoting.AppRemoting.prototype.runApplicationUrl_ = function() { |
334 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + | 334 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + |
335 remoting.settings.getAppRemotingApplicationId() + '/run'; | 335 remoting.settings.getAppRemotingApplicationId() + '/run'; |
336 }; | 336 }; |
OLD | NEW |