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

Unified Diff: remoting/host/desktop_session_proxy.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/desktop_session_proxy.h ('k') | remoting/host/input_injector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index f0ff52ad9f3c251a2315bfec9d357a7b68721b9e..68d9f964011a836748bee75954bbc43e83cb180f 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -24,6 +24,7 @@
#include "remoting/proto/audio.pb.h"
#include "remoting/proto/control.pb.h"
#include "remoting/proto/event.pb.h"
+#include "remoting/protocol/capability_names.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
@@ -34,8 +35,6 @@
#endif // defined(OS_WIN)
const bool kReadOnly = true;
-const char kSendInitialResolution[] = "sendInitialResolution";
-const char kRateLimitResizeRequests[] = "rateLimitResizeRequests";
namespace remoting {
@@ -109,7 +108,8 @@ DesktopSessionProxy::DesktopSessionProxy(
scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control,
base::WeakPtr<DesktopSessionConnector> desktop_session_connector,
- bool virtual_terminal)
+ bool virtual_terminal,
+ bool supports_touch_events)
: audio_capture_task_runner_(audio_capture_task_runner),
caller_task_runner_(caller_task_runner),
io_task_runner_(io_task_runner),
@@ -118,7 +118,8 @@ DesktopSessionProxy::DesktopSessionProxy(
desktop_session_connector_(desktop_session_connector),
pending_capture_frame_requests_(0),
is_desktop_session_connected_(false),
- virtual_terminal_(virtual_terminal) {
+ virtual_terminal_(virtual_terminal),
+ supports_touch_events_(supports_touch_events) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
}
@@ -152,10 +153,14 @@ scoped_ptr<webrtc::MouseCursorMonitor>
}
std::string DesktopSessionProxy::GetCapabilities() const {
- std::string result = kRateLimitResizeRequests;
+ std::string result = protocol::kRateLimitResizeRequests;
// Ask the client to send its resolution unconditionally.
if (virtual_terminal_)
- result = result + " " + kSendInitialResolution;
+ result = result + " " + protocol::kSendInitialResolution;
+
+ if (supports_touch_events_)
+ result = result + " " + protocol::kTouchEventsCapability;
+
return result;
}
@@ -166,7 +171,7 @@ void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) {
// sent its screen resolution (the 'sendInitialResolution' capability is
// supported).
if (virtual_terminal_ &&
- HasCapability(capabilities, kSendInitialResolution)) {
+ HasCapability(capabilities, protocol::kSendInitialResolution)) {
VLOG(1) << "Waiting for the client screen resolution.";
return;
}
« no previous file with comments | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/input_injector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698