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

Unified Diff: remoting/host/client_session.cc

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should fix mac build 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 905539bc8f5fb690298a0d8af4abba7554537cac..c7bfdc81f6d8e48d7e618b0d4649d9935434dca5 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -40,6 +40,8 @@ namespace remoting {
namespace {
+const char kMultiTouchCapability[] = "multiTouch";
+
scoped_ptr<VideoEncoder> CreateVideoEncoder(
const protocol::SessionConfig& config) {
const protocol::ChannelConfig& video_config = config.video_config();
@@ -307,18 +309,20 @@ void ClientSession::OnConnectionAuthenticated(
// Connect video stub.
mouse_clamping_filter_.set_video_stub(connection_->video_stub());
+ // Create the event executor.
+ input_injector_ = desktop_environment_->CreateInputInjector();
+
// Collate the set of capabilities to offer the client, if it supports them.
host_capabilities_ = desktop_environment_->GetCapabilities();
if (!host_capabilities_.empty())
host_capabilities_.append(" ");
+ if (input_injector_->CanInjectTouch())
+ host_capabilities_.append(std::string(kMultiTouchCapability) + " ");
host_capabilities_.append(extension_manager_->GetCapabilities());
// Create the object that controls the screen resolution.
screen_controls_ = desktop_environment_->CreateScreenControls();
- // Create the event executor.
- input_injector_ = desktop_environment_->CreateInputInjector();
-
// Connect the host input stubs.
connection_->set_input_stub(&disable_input_filter_);
host_input_filter_.set_input_stub(input_injector_.get());

Powered by Google App Engine
This is Rietveld 408576698