Chromium Code Reviews| Index: remoting/host/desktop_session_proxy.cc |
| diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc |
| index b09f2829e637a985707f3f44b8f2552b8709e04a..6f228f83853cab0351db8f0d253a98a9a0d3ed8e 100644 |
| --- a/remoting/host/desktop_session_proxy.cc |
| +++ b/remoting/host/desktop_session_proxy.cc |
| @@ -93,8 +93,7 @@ DesktopSessionProxy::DesktopSessionProxy( |
| scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| base::WeakPtr<ClientSessionControl> client_session_control, |
| base::WeakPtr<DesktopSessionConnector> desktop_session_connector, |
| - bool virtual_terminal, |
| - bool supports_touch_events) |
| + bool virtual_terminal) |
| : audio_capture_task_runner_(audio_capture_task_runner), |
| caller_task_runner_(caller_task_runner), |
| io_task_runner_(io_task_runner), |
| @@ -102,8 +101,7 @@ DesktopSessionProxy::DesktopSessionProxy( |
| desktop_session_connector_(desktop_session_connector), |
| pending_capture_frame_requests_(0), |
| is_desktop_session_connected_(false), |
| - virtual_terminal_(virtual_terminal), |
| - supports_touch_events_(supports_touch_events) { |
| + virtual_terminal_(virtual_terminal) { |
| DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| } |
| @@ -140,11 +138,15 @@ DesktopSessionProxy::CreateMouseCursorMonitor() { |
| std::string DesktopSessionProxy::GetCapabilities() const { |
| std::string result = protocol::kRateLimitResizeRequests; |
| // Ask the client to send its resolution unconditionally. |
| - if (virtual_terminal_) |
| - result = result + " " + protocol::kSendInitialResolution; |
| + if (virtual_terminal_) { |
| + result += " "; |
| + result += protocol::kSendInitialResolution; |
|
Hzj_jie
2016/10/26 18:56:32
string::append?
Sergey Ulanov
2016/10/26 19:32:56
+= is more readable and does the same thing
Hzj_jie
2016/10/26 22:38:39
No matter, it's more like a personal preference as
|
| + } |
| - if (supports_touch_events_) |
| - result = result + " " + protocol::kTouchEventsCapability; |
| + if (InputInjector::SupportsTouchEvents()) { |
| + result += " "; |
| + result += protocol::kTouchEventsCapability; |
| + } |
| return result; |
| } |