Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: remoting/webapp/client_session.js

Issue 305393003: Fix Chromoting client startup warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add {} around return for consistency. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/webapp/host_settings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client session.
8 * 8 *
9 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 * @param {boolean} apply True to apply remappings, false to cancel them. 711 * @param {boolean} apply True to apply remappings, false to cancel them.
712 */ 712 */
713 remoting.ClientSession.prototype.applyRemapKeys_ = function(apply) { 713 remoting.ClientSession.prototype.applyRemapKeys_ = function(apply) {
714 // By default, under ChromeOS, remap the right Control key to the right 714 // By default, under ChromeOS, remap the right Control key to the right
715 // Win / Cmd key. 715 // Win / Cmd key.
716 var remapKeys = this.remapKeys_; 716 var remapKeys = this.remapKeys_;
717 if (remapKeys == '' && remoting.runningOnChromeOS()) { 717 if (remapKeys == '' && remoting.runningOnChromeOS()) {
718 remapKeys = '0x0700e4>0x0700e7'; 718 remapKeys = '0x0700e4>0x0700e7';
719 } 719 }
720 720
721 if (remapKeys == '') {
722 return;
723 }
724
721 var remappings = remapKeys.split(','); 725 var remappings = remapKeys.split(',');
722 for (var i = 0; i < remappings.length; ++i) { 726 for (var i = 0; i < remappings.length; ++i) {
723 var keyCodes = remappings[i].split('>'); 727 var keyCodes = remappings[i].split('>');
724 if (keyCodes.length != 2) { 728 if (keyCodes.length != 2) {
725 console.log('bad remapKey: ' + remappings[i]); 729 console.log('bad remapKey: ' + remappings[i]);
726 continue; 730 continue;
727 } 731 }
728 var fromKey = parseInt(keyCodes[0], 0); 732 var fromKey = parseInt(keyCodes[0], 0);
729 var toKey = parseInt(keyCodes[1], 0); 733 var toKey = parseInt(keyCodes[1], 0);
730 if (!fromKey || !toKey) { 734 if (!fromKey || !toKey) {
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 * @return {{width: number, height: number}} The height of the window's client 1507 * @return {{width: number, height: number}} The height of the window's client
1504 * area. This differs between apps v1 and apps v2 due to the custom window 1508 * area. This differs between apps v1 and apps v2 due to the custom window
1505 * borders used by the latter. 1509 * borders used by the latter.
1506 * @private 1510 * @private
1507 */ 1511 */
1508 remoting.ClientSession.prototype.getClientArea_ = function() { 1512 remoting.ClientSession.prototype.getClientArea_ = function() {
1509 return remoting.windowFrame ? 1513 return remoting.windowFrame ?
1510 remoting.windowFrame.getClientArea() : 1514 remoting.windowFrame.getClientArea() :
1511 { 'width': window.innerWidth, 'height': window.innerHeight }; 1515 { 'width': window.innerWidth, 'height': window.innerHeight };
1512 } 1516 }
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/host_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698