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

Side by Side Diff: remoting/webapp/base/js/client_plugin_host_desktop_impl.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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
OLDNEW
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Provides an interface to manage the Host Desktop of a remoting session. 7 * Provides an interface to manage the Host Desktop of a remoting session.
8 */ 8 */
9 9
10 var remoting = remoting || {}; 10 var remoting = remoting || {};
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 * desktop is changed. 99 * desktop is changed.
100 * 100 *
101 * @param {remoting.ClientPluginMessage} message 101 * @param {remoting.ClientPluginMessage} message
102 * @return {Array<{left:number, top:number, width:number, height:number}>} 102 * @return {Array<{left:number, top:number, width:number, height:number}>}
103 * rectangles of the desktop shape. 103 * rectangles of the desktop shape.
104 */ 104 */
105 remoting.ClientPlugin.HostDesktopImpl.prototype.onShapeUpdated = 105 remoting.ClientPlugin.HostDesktopImpl.prototype.onShapeUpdated =
106 function(message) { 106 function(message) {
107 var shapes = base.getArrayAttr(message.data, 'rects'); 107 var shapes = base.getArrayAttr(message.data, 'rects');
108 var rects = shapes.map( 108 var rects = shapes.map(
109 /** @param {Array.<number>} shape */ 109 /** @param {Array<number>} shape */
110 function(shape) { 110 function(shape) {
111 if (!Array.isArray(shape) || shape.length != 4) { 111 if (!Array.isArray(shape) || shape.length != 4) {
112 throw 'Received invalid onDesktopShape message'; 112 throw 'Received invalid onDesktopShape message';
113 } 113 }
114 var rect = {}; 114 var rect = {};
115 rect.left = shape[0]; 115 rect.left = shape[0];
116 rect.top = shape[1]; 116 rect.top = shape[1];
117 rect.width = shape[2]; 117 rect.width = shape[2];
118 rect.height = shape[3]; 118 rect.height = shape[3];
119 return rect; 119 return rect;
120 }); 120 });
121 121
122 this.raiseEvent(remoting.HostDesktop.Events.shapeChanged, rects); 122 this.raiseEvent(remoting.HostDesktop.Events.shapeChanged, rects);
123 return rects; 123 return rects;
124 }; 124 };
125 125
126 }()); 126 }());
OLDNEW
« no previous file with comments | « native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_instance.html ('k') | remoting/webapp/base/js/host.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698