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

Side by Side Diff: remoting/host/desktop_session_proxy.cc

Issue 2456563002: Remove supports_touch_events flag from BasicDesktopEnvironment (Closed)
Patch Set: remove test Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/ipc_desktop_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/desktop_session_proxy.h" 5 #include "remoting/host/desktop_session_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 DISALLOW_COPY_AND_ASSIGN(IpcSharedBuffer); 87 DISALLOW_COPY_AND_ASSIGN(IpcSharedBuffer);
88 }; 88 };
89 89
90 DesktopSessionProxy::DesktopSessionProxy( 90 DesktopSessionProxy::DesktopSessionProxy(
91 scoped_refptr<base::SingleThreadTaskRunner> audio_capture_task_runner, 91 scoped_refptr<base::SingleThreadTaskRunner> audio_capture_task_runner,
92 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 92 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
93 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 93 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
94 base::WeakPtr<ClientSessionControl> client_session_control, 94 base::WeakPtr<ClientSessionControl> client_session_control,
95 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, 95 base::WeakPtr<DesktopSessionConnector> desktop_session_connector,
96 bool virtual_terminal, 96 bool virtual_terminal)
97 bool supports_touch_events)
98 : audio_capture_task_runner_(audio_capture_task_runner), 97 : audio_capture_task_runner_(audio_capture_task_runner),
99 caller_task_runner_(caller_task_runner), 98 caller_task_runner_(caller_task_runner),
100 io_task_runner_(io_task_runner), 99 io_task_runner_(io_task_runner),
101 client_session_control_(client_session_control), 100 client_session_control_(client_session_control),
102 desktop_session_connector_(desktop_session_connector), 101 desktop_session_connector_(desktop_session_connector),
103 pending_capture_frame_requests_(0), 102 pending_capture_frame_requests_(0),
104 is_desktop_session_connected_(false), 103 is_desktop_session_connected_(false),
105 virtual_terminal_(virtual_terminal), 104 virtual_terminal_(virtual_terminal) {
106 supports_touch_events_(supports_touch_events) {
107 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 105 DCHECK(caller_task_runner_->BelongsToCurrentThread());
108 } 106 }
109 107
110 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() { 108 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() {
111 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 109 DCHECK(caller_task_runner_->BelongsToCurrentThread());
112 110
113 return base::MakeUnique<IpcAudioCapturer>(this); 111 return base::MakeUnique<IpcAudioCapturer>(this);
114 } 112 }
115 113
116 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() { 114 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() {
(...skipping 16 matching lines...) Expand all
133 } 131 }
134 132
135 std::unique_ptr<webrtc::MouseCursorMonitor> 133 std::unique_ptr<webrtc::MouseCursorMonitor>
136 DesktopSessionProxy::CreateMouseCursorMonitor() { 134 DesktopSessionProxy::CreateMouseCursorMonitor() {
137 return base::MakeUnique<IpcMouseCursorMonitor>(this); 135 return base::MakeUnique<IpcMouseCursorMonitor>(this);
138 } 136 }
139 137
140 std::string DesktopSessionProxy::GetCapabilities() const { 138 std::string DesktopSessionProxy::GetCapabilities() const {
141 std::string result = protocol::kRateLimitResizeRequests; 139 std::string result = protocol::kRateLimitResizeRequests;
142 // Ask the client to send its resolution unconditionally. 140 // Ask the client to send its resolution unconditionally.
143 if (virtual_terminal_) 141 if (virtual_terminal_) {
144 result = result + " " + protocol::kSendInitialResolution; 142 result += " ";
143 result += protocol::kSendInitialResolution;
144 }
145 145
146 if (supports_touch_events_) 146 if (InputInjector::SupportsTouchEvents()) {
147 result = result + " " + protocol::kTouchEventsCapability; 147 result += " ";
148 result += protocol::kTouchEventsCapability;
149 }
148 150
149 return result; 151 return result;
150 } 152 }
151 153
152 void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) { 154 void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) {
153 // Delay creation of the desktop session until the client screen resolution is 155 // Delay creation of the desktop session until the client screen resolution is
154 // received if the desktop session requires the initial screen resolution 156 // received if the desktop session requires the initial screen resolution
155 // (when |virtual_terminal_| is true) and the client is expected to 157 // (when |virtual_terminal_| is true) and the client is expected to
156 // sent its screen resolution (the 'sendInitialResolution' capability is 158 // sent its screen resolution (the 'sendInitialResolution' capability is
157 // supported). 159 // supported).
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 552 }
551 553
552 // static 554 // static
553 void DesktopSessionProxyTraits::Destruct( 555 void DesktopSessionProxyTraits::Destruct(
554 const DesktopSessionProxy* desktop_session_proxy) { 556 const DesktopSessionProxy* desktop_session_proxy) {
555 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, 557 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE,
556 desktop_session_proxy); 558 desktop_session_proxy);
557 } 559 }
558 560
559 } // namespace remoting 561 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/ipc_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698