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

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

Issue 9958146: Revert 130500 - Merge 130082 - Add an injectKeyEvent API to the Chromoting client plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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 | « remoting/webapp/client_plugin.js ('k') | no next file » | 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 /** 261 /**
262 * Release all currently pressed keys. 262 * Release all currently pressed keys.
263 */ 263 */
264 remoting.ClientPluginAsync.prototype.releaseAllKeys = function() { 264 remoting.ClientPluginAsync.prototype.releaseAllKeys = function() {
265 this.plugin.postMessage(JSON.stringify( 265 this.plugin.postMessage(JSON.stringify(
266 { method: 'releaseAllKeys', data: {} })); 266 { method: 'releaseAllKeys', data: {} }));
267 }; 267 };
268 268
269 /** 269 /**
270 * Send a key event to the host.
271 *
272 * @param {number} usb_keycode The USB-style code of the key to inject.
273 * @param {boolean} pressed True to inject a key press, False for a release.
274 */
275 remoting.ClientPluginAsync.prototype.injectKey =
276 function(usb_keycode, pressed) {
277 this.plugin.postMessage(JSON.stringify(
278 { method: 'injectKeyEvent', data: {
279 'usb_keycode': usb_keycode,
280 'pressed': pressed}
281 }));
282 };
283
284 /**
285 * Returns an associative array with a set of stats for this connecton. 270 * Returns an associative array with a set of stats for this connecton.
286 * 271 *
287 * @return {remoting.ClientSession.PerfStats} The connection statistics. 272 * @return {remoting.ClientSession.PerfStats} The connection statistics.
288 */ 273 */
289 remoting.ClientPluginAsync.prototype.getPerfStats = function() { 274 remoting.ClientPluginAsync.prototype.getPerfStats = function() {
290 return this.perfStats_; 275 return this.perfStats_;
291 }; 276 };
OLDNEW
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698