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

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

Issue 2458513004: Revert of Remove supports_touch_events flag from BasicDesktopEnvironment (Closed)
Patch Set: 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)
97 : audio_capture_task_runner_(audio_capture_task_runner), 98 : audio_capture_task_runner_(audio_capture_task_runner),
98 caller_task_runner_(caller_task_runner), 99 caller_task_runner_(caller_task_runner),
99 io_task_runner_(io_task_runner), 100 io_task_runner_(io_task_runner),
100 client_session_control_(client_session_control), 101 client_session_control_(client_session_control),
101 desktop_session_connector_(desktop_session_connector), 102 desktop_session_connector_(desktop_session_connector),
102 pending_capture_frame_requests_(0), 103 pending_capture_frame_requests_(0),
103 is_desktop_session_connected_(false), 104 is_desktop_session_connected_(false),
104 virtual_terminal_(virtual_terminal) { 105 virtual_terminal_(virtual_terminal),
106 supports_touch_events_(supports_touch_events) {
105 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 107 DCHECK(caller_task_runner_->BelongsToCurrentThread());
106 } 108 }
107 109
108 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() { 110 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() {
109 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 111 DCHECK(caller_task_runner_->BelongsToCurrentThread());
110 112
111 return base::MakeUnique<IpcAudioCapturer>(this); 113 return base::MakeUnique<IpcAudioCapturer>(this);
112 } 114 }
113 115
114 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() { 116 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() {
(...skipping 16 matching lines...) Expand all
131 } 133 }
132 134
133 std::unique_ptr<webrtc::MouseCursorMonitor> 135 std::unique_ptr<webrtc::MouseCursorMonitor>
134 DesktopSessionProxy::CreateMouseCursorMonitor() { 136 DesktopSessionProxy::CreateMouseCursorMonitor() {
135 return base::MakeUnique<IpcMouseCursorMonitor>(this); 137 return base::MakeUnique<IpcMouseCursorMonitor>(this);
136 } 138 }
137 139
138 std::string DesktopSessionProxy::GetCapabilities() const { 140 std::string DesktopSessionProxy::GetCapabilities() const {
139 std::string result = protocol::kRateLimitResizeRequests; 141 std::string result = protocol::kRateLimitResizeRequests;
140 // Ask the client to send its resolution unconditionally. 142 // Ask the client to send its resolution unconditionally.
141 if (virtual_terminal_) { 143 if (virtual_terminal_)
142 result += " "; 144 result = result + " " + protocol::kSendInitialResolution;
143 result += protocol::kSendInitialResolution;
144 }
145 145
146 if (InputInjector::SupportsTouchEvents()) { 146 if (supports_touch_events_)
147 result += " "; 147 result = result + " " + protocol::kTouchEventsCapability;
148 result += protocol::kTouchEventsCapability;
149 }
150 148
151 return result; 149 return result;
152 } 150 }
153 151
154 void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) { 152 void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) {
155 // Delay creation of the desktop session until the client screen resolution is 153 // Delay creation of the desktop session until the client screen resolution is
156 // received if the desktop session requires the initial screen resolution 154 // received if the desktop session requires the initial screen resolution
157 // (when |virtual_terminal_| is true) and the client is expected to 155 // (when |virtual_terminal_| is true) and the client is expected to
158 // sent its screen resolution (the 'sendInitialResolution' capability is 156 // sent its screen resolution (the 'sendInitialResolution' capability is
159 // supported). 157 // supported).
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 550 }
553 551
554 // static 552 // static
555 void DesktopSessionProxyTraits::Destruct( 553 void DesktopSessionProxyTraits::Destruct(
556 const DesktopSessionProxy* desktop_session_proxy) { 554 const DesktopSessionProxy* desktop_session_proxy) {
557 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, 555 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE,
558 desktop_session_proxy); 556 desktop_session_proxy);
559 } 557 }
560 558
561 } // namespace remoting 559 } // 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