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

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

Issue 2913073002: Stops accumulating performance statistics on the Chrome App. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | remoting/webapp/base/js/client_session.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 that wraps low-level details of interacting with the client plugin. 7 * Class that wraps low-level details of interacting with the client plugin.
8 * 8 *
9 * This abstracts a <embed> element and controls the plugin which does 9 * This abstracts a <embed> element and controls the plugin which does
10 * the actual remoting work. It also handles differences between 10 * the actual remoting work. It also handles differences between
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (message.method == 'hello') { 271 if (message.method == 'hello') {
272 this.onInitializedDeferred_.resolve(); 272 this.onInitializedDeferred_.resolve();
273 } else if (message.method == 'onDesktopSize') { 273 } else if (message.method == 'onDesktopSize') {
274 this.hostDesktop_.onSizeUpdated(message); 274 this.hostDesktop_.onSizeUpdated(message);
275 } else if (message.method == 'onPerfStats') { 275 } else if (message.method == 'onPerfStats') {
276 // Return value is ignored. These calls will throw an error if the value 276 // Return value is ignored. These calls will throw an error if the value
277 // is not a number. 277 // is not a number.
278 base.getNumberAttr(message.data, 'videoBandwidth'); 278 base.getNumberAttr(message.data, 'videoBandwidth');
279 base.getNumberAttr(message.data, 'videoFrameRate'); 279 base.getNumberAttr(message.data, 'videoFrameRate');
280 base.getNumberAttr(message.data, 'captureLatency'); 280 base.getNumberAttr(message.data, 'captureLatency');
281 base.getNumberAttr(message.data, 'maxCaptureLatency');
281 base.getNumberAttr(message.data, 'encodeLatency'); 282 base.getNumberAttr(message.data, 'encodeLatency');
283 base.getNumberAttr(message.data, 'maxEncodeLatency');
282 base.getNumberAttr(message.data, 'decodeLatency'); 284 base.getNumberAttr(message.data, 'decodeLatency');
285 base.getNumberAttr(message.data, 'maxDecodeLatency');
283 base.getNumberAttr(message.data, 'renderLatency'); 286 base.getNumberAttr(message.data, 'renderLatency');
287 base.getNumberAttr(message.data, 'maxRenderLatency');
284 base.getNumberAttr(message.data, 'roundtripLatency'); 288 base.getNumberAttr(message.data, 'roundtripLatency');
289 base.getNumberAttr(message.data, 'maxRoundtripLatency');
290
285 this.perfStats_ = 291 this.perfStats_ =
286 /** @type {remoting.ClientSession.PerfStats} */ (message.data); 292 /** @type {remoting.ClientSession.PerfStats} */ (message.data);
287 293
288 } else if (message.method == 'injectClipboardItem') { 294 } else if (message.method == 'injectClipboardItem') {
289 var mimetype = base.getStringAttr(message.data, 'mimeType'); 295 var mimetype = base.getStringAttr(message.data, 'mimeType');
290 var item = base.getStringAttr(message.data, 'item'); 296 var item = base.getStringAttr(message.data, 'item');
291 this.updateClipboardData_(mimetype, item); 297 this.updateClipboardData_(mimetype, item);
292 298
293 } else if (message.method == 'fetchPin') { 299 } else if (message.method == 'fetchPin') {
294 // The pairingSupported value in the dictionary indicates whether both 300 // The pairingSupported value in the dictionary indicates whether both
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return new remoting.ClientPluginImpl(container, 776 return new remoting.ClientPluginImpl(container,
771 capabilities); 777 capabilities);
772 }; 778 };
773 779
774 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { 780 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() {
775 var plugin = remoting.ClientPluginImpl.createPluginElement_(); 781 var plugin = remoting.ClientPluginImpl.createPluginElement_();
776 plugin.addEventListener( 782 plugin.addEventListener(
777 'loadend', function() { document.body.removeChild(plugin); }, false); 783 'loadend', function() { document.body.removeChild(plugin); }, false);
778 document.body.appendChild(plugin); 784 document.body.appendChild(plugin);
779 }; 785 };
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/base/js/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698