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

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

Issue 1827043004: Remove shaped desktop support from remoting host and client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « remoting/test/test_video_renderer.cc ('k') | remoting/webapp/base/js/client_plugin_impl.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 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 remoting.ClientPlugin.HostDesktopImpl.prototype.onSizeUpdated = function( 79 remoting.ClientPlugin.HostDesktopImpl.prototype.onSizeUpdated = function(
80 message) { 80 message) {
81 this.width_ = base.getNumberAttr(message.data, 'width'); 81 this.width_ = base.getNumberAttr(message.data, 'width');
82 this.height_ = base.getNumberAttr(message.data, 'height'); 82 this.height_ = base.getNumberAttr(message.data, 'height');
83 this.xDpi_ = base.getNumberAttr(message.data, 'x_dpi', 96); 83 this.xDpi_ = base.getNumberAttr(message.data, 'x_dpi', 96);
84 this.yDpi_ = base.getNumberAttr(message.data, 'y_dpi', 96); 84 this.yDpi_ = base.getNumberAttr(message.data, 'y_dpi', 96);
85 this.raiseEvent(remoting.HostDesktop.Events.sizeChanged, 85 this.raiseEvent(remoting.HostDesktop.Events.sizeChanged,
86 this.getDimensions()); 86 this.getDimensions());
87 }; 87 };
88 88
89 /**
90 * This function is called by |this.plugin_| when the shape of the host
91 * desktop is changed.
92 *
93 * @param {remoting.ClientPluginMessage} message
94 * @return {Array<{left:number, top:number, width:number, height:number}>}
95 * rectangles of the desktop shape.
96 */
97 remoting.ClientPlugin.HostDesktopImpl.prototype.onShapeUpdated =
98 function(message) {
99 var shapes = base.getArrayAttr(message.data, 'rects');
100 var rects = shapes.map(
101 /** @param {Array<number>} shape */
102 function(shape) {
103 if (!Array.isArray(shape) || shape.length != 4) {
104 throw 'Received invalid onDesktopShape message';
105 }
106 var rect = {};
107 rect.left = shape[0];
108 rect.top = shape[1];
109 rect.width = shape[2];
110 rect.height = shape[3];
111 return rect;
112 });
113
114 this.raiseEvent(remoting.HostDesktop.Events.shapeChanged, rects);
115 return rects;
116 };
117
118 }()); 89 }());
OLDNEW
« no previous file with comments | « remoting/test/test_video_renderer.cc ('k') | remoting/webapp/base/js/client_plugin_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698