| 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 desktop | 7 * This class implements the functionality that is specific to desktop |
| 8 * remoting ("Chromoting" or CRD). | 8 * remoting ("Chromoting" or CRD). |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 var remapKeys = ''; | 149 var remapKeys = ''; |
| 150 // By default, under ChromeOS, remap the right Control key to the right | 150 // By default, under ChromeOS, remap the right Control key to the right |
| 151 // Win / Cmd key. | 151 // Win / Cmd key. |
| 152 if (remoting.platformIsChromeOS()) { | 152 if (remoting.platformIsChromeOS()) { |
| 153 remapKeys = '0x0700e4>0x0700e7'; | 153 remapKeys = '0x0700e4>0x0700e7'; |
| 154 } | 154 } |
| 155 return remapKeys; | 155 return remapKeys; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 /** | 158 /** |
| 159 * @return {Array.<string>} A list of |ClientSession.Capability|s required | |
| 160 * by this application. | |
| 161 */ | |
| 162 remoting.DesktopRemoting.prototype.getRequiredCapabilities = function() { | |
| 163 return [ | |
| 164 remoting.ClientSession.Capability.SEND_INITIAL_RESOLUTION, | |
| 165 remoting.ClientSession.Capability.RATE_LIMIT_RESIZE_REQUESTS, | |
| 166 remoting.ClientSession.Capability.VIDEO_RECORDER, | |
| 167 // TODO(aiguha): Add this capability based on a gyp/command-line flag, | |
| 168 // rather than by default. | |
| 169 remoting.ClientSession.Capability.CAST | |
| 170 ]; | |
| 171 }; | |
| 172 | |
| 173 /** | |
| 174 * Called when a new session has been connected. | 159 * Called when a new session has been connected. |
| 175 * | 160 * |
| 176 * @param {remoting.ClientSession} clientSession | 161 * @param {remoting.ClientSession} clientSession |
| 177 * @return {void} Nothing. | 162 * @return {void} Nothing. |
| 178 */ | 163 */ |
| 179 remoting.DesktopRemoting.prototype.handleConnected = function(clientSession) { | 164 remoting.DesktopRemoting.prototype.handleConnected = function(clientSession) { |
| 180 // Set the text on the buttons shown under the error message so that they are | 165 // Set the text on the buttons shown under the error message so that they are |
| 181 // easy to understand in the case where a successful connection failed, as | 166 // easy to understand in the case where a successful connection failed, as |
| 182 // opposed to the case where a connection never succeeded. | 167 // opposed to the case where a connection never succeeded. |
| 183 // TODO(garykac): Investigate to see if these need to be reverted to their | 168 // TODO(garykac): Investigate to see if these need to be reverted to their |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 if (mode == remoting.ClientSession.Mode.IT2ME) { | 308 if (mode == remoting.ClientSession.Mode.IT2ME) { |
| 324 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); | 309 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); |
| 325 remoting.hangoutSessionEvents.raiseEvent( | 310 remoting.hangoutSessionEvents.raiseEvent( |
| 326 remoting.hangoutSessionEvents.sessionStateChanged, | 311 remoting.hangoutSessionEvents.sessionStateChanged, |
| 327 remoting.ClientSession.State.FAILED | 312 remoting.ClientSession.State.FAILED |
| 328 ); | 313 ); |
| 329 } else { | 314 } else { |
| 330 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); | 315 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); |
| 331 } | 316 } |
| 332 }; | 317 }; |
| OLD | NEW |