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

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

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to setting a flag on DesktopEnvironmentFactory Created 5 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
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // resolution to the host once connection has been established. See 200 // resolution to the host once connection has been established. See
201 // this.plugin_.notifyClientResolution(). 201 // this.plugin_.notifyClientResolution().
202 SEND_INITIAL_RESOLUTION: 'sendInitialResolution', 202 SEND_INITIAL_RESOLUTION: 'sendInitialResolution',
203 203
204 // Let the host know that we're interested in knowing whether or not it 204 // Let the host know that we're interested in knowing whether or not it
205 // rate limits desktop-resize requests. 205 // rate limits desktop-resize requests.
206 // TODO(kelvinp): This has been supported since M-29. Currently we only have 206 // TODO(kelvinp): This has been supported since M-29. Currently we only have
207 // <1000 users on M-29 or below. Remove this and the capability on the host. 207 // <1000 users on M-29 or below. Remove this and the capability on the host.
208 RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests', 208 RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests',
209 209
210 // Host & client support touch. If the host does not support touch then the
211 // client will let PPAPI translate touch input into mouse events, for
212 // compatibility with non-touch-aware UI.
Wez 2015/04/21 02:12:12 Suggest just "Indicates native touch input support
Rintaro Kuroiwa 2015/04/22 19:56:00 Done.
213 MULTI_TOUCH: 'multiTouch',
214
210 // Indicates that host/client supports Google Drive integration, and that the 215 // Indicates that host/client supports Google Drive integration, and that the
211 // client should send to the host the OAuth tokens to be used by Google Drive 216 // client should send to the host the OAuth tokens to be used by Google Drive
212 // on the host. 217 // on the host.
213 GOOGLE_DRIVE: "googleDrive", 218 GOOGLE_DRIVE: "googleDrive",
214 219
215 // Indicates that the client supports the video frame-recording extension. 220 // Indicates that the client supports the video frame-recording extension.
216 VIDEO_RECORDER: 'videoRecorder', 221 VIDEO_RECORDER: 'videoRecorder',
217 222
218 // Indicates that the client supports 'cast'ing the video stream to a 223 // Indicates that the client supports 'cast'ing the video stream to a
219 // cast-enabled device. 224 // cast-enabled device.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 remoting.ClientSession.prototype.onSetCapabilities = function(capabilities) { 463 remoting.ClientSession.prototype.onSetCapabilities = function(capabilities) {
459 if (this.capabilities_ != null) { 464 if (this.capabilities_ != null) {
460 console.error('onSetCapabilities_() is called more than once'); 465 console.error('onSetCapabilities_() is called more than once');
461 return; 466 return;
462 } 467 }
463 468
464 this.capabilities_ = capabilities; 469 this.capabilities_ = capabilities;
465 if (this.hasCapability(remoting.ClientSession.Capability.GOOGLE_DRIVE)) { 470 if (this.hasCapability(remoting.ClientSession.Capability.GOOGLE_DRIVE)) {
466 this.sendGoogleDriveAccessToken_(); 471 this.sendGoogleDriveAccessToken_();
467 } 472 }
473 if (this.hasCapability(remoting.ClientSession.Capability.MULTI_TOUCH)) {
474 this.plugin_.enableTouchEvents(true);
475 }
468 }; 476 };
469 477
470 /** 478 /**
471 * @param {string} type 479 * @param {string} type
472 * @param {string} data 480 * @param {string} data
473 */ 481 */
474 remoting.ClientSession.prototype.onExtensionMessage = function(type, data) { 482 remoting.ClientSession.prototype.onExtensionMessage = function(type, data) {
475 this.onExtensionMessageHandler_(type, data); 483 this.onExtensionMessageHandler_(type, data);
476 }; 484 };
477 485
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 var googleDriveScopes = [ 603 var googleDriveScopes = [
596 'https://docs.google.com/feeds/', 604 'https://docs.google.com/feeds/',
597 'https://www.googleapis.com/auth/drive' 605 'https://www.googleapis.com/auth/drive'
598 ]; 606 ];
599 remoting.identity.getNewToken(googleDriveScopes). 607 remoting.identity.getNewToken(googleDriveScopes).
600 then(sendToken). 608 then(sendToken).
601 catch(remoting.Error.handler(sendError)); 609 catch(remoting.Error.handler(sendError));
602 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this), 610 window.setTimeout(this.sendGoogleDriveAccessToken_.bind(this),
603 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS); 611 remoting.ACCESS_TOKEN_RESEND_INTERVAL_MS);
604 }; 612 };
605
OLDNEW
« remoting/webapp/crd/js/client_plugin_impl.js ('K') | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698