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

Unified Diff: remoting/webapp/base/js/client_session.js

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change setter to public and add license header 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/client_plugin_impl.js ('k') | remoting/webapp/base/js/client_session_factory.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/client_session.js
diff --git a/remoting/webapp/base/js/client_session.js b/remoting/webapp/base/js/client_session.js
index 79056abe10f3143ffa3fdc3d311fe887ea2d4a98..294fe53b366a320bd9bd82c36ec8c20f5a2b9abc 100644
--- a/remoting/webapp/base/js/client_session.js
+++ b/remoting/webapp/base/js/client_session.js
@@ -226,6 +226,11 @@ remoting.ClientSession.Capability = {
// <1000 users on M-29 or below. Remove this and the capability on the host.
RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests',
+ // Indicates native touch input support. If the host does not support
+ // touch then the client will let Chrome synthesize mouse events from touch
+ // input, for compatibility with non-touch-aware systems.
+ TOUCH_EVENTS: 'touchEvents',
+
// Indicates that host/client supports Google Drive integration, and that the
// client should send to the host the OAuth tokens to be used by Google Drive
// on the host.
@@ -529,6 +534,10 @@ remoting.ClientSession.prototype.setState_ = function(newState) {
this.notifyStateChanges_(oldState, this.state_);
this.logToServer_.logClientSessionStateChange(this.state_, this.error_);
+ if (this.plugin_.hasCapability(
+ remoting.ClientSession.Capability.TOUCH_EVENTS)) {
+ this.plugin_.enableTouchEvents(true);
+ }
};
/**
« no previous file with comments | « remoting/webapp/base/js/client_plugin_impl.js ('k') | remoting/webapp/base/js/client_session_factory.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698