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

Unified Diff: remoting/host/basic_desktop_environment.cc

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/host/basic_desktop_environment.h ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/basic_desktop_environment.cc
diff --git a/remoting/host/basic_desktop_environment.cc b/remoting/host/basic_desktop_environment.cc
index e7132f655782431684c9dd69086d5ef2ccd6a42a..6d9cc3cb4e8ce4b150b447de74c2398c1dc0a020 100644
--- a/remoting/host/basic_desktop_environment.cc
+++ b/remoting/host/basic_desktop_environment.cc
@@ -16,6 +16,7 @@
#include "remoting/host/gnubby_auth_handler.h"
#include "remoting/host/input_injector.h"
#include "remoting/host/screen_controls.h"
+#include "remoting/protocol/capability_names.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
@@ -55,6 +56,9 @@ BasicDesktopEnvironment::CreateMouseCursorMonitor() {
}
std::string BasicDesktopEnvironment::GetCapabilities() const {
+ if (supports_touch_events_)
+ return protocol::kTouchEventsCapability;
+
return std::string();
}
@@ -83,13 +87,15 @@ BasicDesktopEnvironment::CreateVideoCapturer() {
BasicDesktopEnvironment::BasicDesktopEnvironment(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ bool supports_touch_events)
: caller_task_runner_(caller_task_runner),
input_task_runner_(input_task_runner),
ui_task_runner_(ui_task_runner),
desktop_capture_options_(
new webrtc::DesktopCaptureOptions(
- webrtc::DesktopCaptureOptions::CreateDefault())) {
+ webrtc::DesktopCaptureOptions::CreateDefault())),
+ supports_touch_events_(supports_touch_events) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
}
@@ -99,7 +105,8 @@ BasicDesktopEnvironmentFactory::BasicDesktopEnvironmentFactory(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)
: caller_task_runner_(caller_task_runner),
input_task_runner_(input_task_runner),
- ui_task_runner_(ui_task_runner) {
+ ui_task_runner_(ui_task_runner),
+ supports_touch_events_(false) {
}
BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {
« no previous file with comments | « remoting/host/basic_desktop_environment.h ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698