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

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: Created 5 years, 9 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/basic_desktop_environment.cc
diff --git a/remoting/host/basic_desktop_environment.cc b/remoting/host/basic_desktop_environment.cc
index e7132f655782431684c9dd69086d5ef2ccd6a42a..4dc309284104680b6fa8ae7ad25c1459574c8d7a 100644
--- a/remoting/host/basic_desktop_environment.cc
+++ b/remoting/host/basic_desktop_environment.cc
@@ -15,6 +15,7 @@
#include "remoting/host/client_session_control.h"
#include "remoting/host/gnubby_auth_handler.h"
#include "remoting/host/input_injector.h"
+#include "remoting/host/multi_touch_capability.h"
#include "remoting/host/screen_controls.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
@@ -55,6 +56,9 @@ BasicDesktopEnvironment::CreateMouseCursorMonitor() {
}
std::string BasicDesktopEnvironment::GetCapabilities() const {
+ if (multi_touch_enabled_)
+ return kMultiTouchCapability;
+
return std::string();
}
@@ -66,6 +70,10 @@ scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler(
return nullptr;
}
+void BasicDesktopEnvironment::SetEnableMultiTouch(bool enable) {
+ multi_touch_enabled_ = enable;
+}
+
scoped_ptr<webrtc::DesktopCapturer>
BasicDesktopEnvironment::CreateVideoCapturer() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
@@ -89,7 +97,8 @@ BasicDesktopEnvironment::BasicDesktopEnvironment(
ui_task_runner_(ui_task_runner),
desktop_capture_options_(
new webrtc::DesktopCaptureOptions(
- webrtc::DesktopCaptureOptions::CreateDefault())) {
+ webrtc::DesktopCaptureOptions::CreateDefault())),
+ multi_touch_enabled_(false) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
}
@@ -99,7 +108,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),
+ multi_touch_enabled_(false) {
}
BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {
@@ -111,4 +121,8 @@ bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
return AudioCapturer::IsSupported();
}
+void BasicDesktopEnvironmentFactory::SetEnableMultiTouch(bool enable) {
+ multi_touch_enabled_ = enable;
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698