OLD | NEW |
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/local_input_monitor.h" | 5 #include "remoting/host/local_input_monitor.h" |
6 | 6 |
7 #include <sys/select.h> | 7 #include <sys/select.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 |
| 10 #include "base/memory/ptr_util.h" |
9 #define XK_MISCELLANY | 11 #define XK_MISCELLANY |
10 #include <X11/keysymdef.h> | 12 #include <X11/keysymdef.h> |
11 | 13 |
12 #include "base/bind.h" | 14 #include "base/bind.h" |
13 #include "base/callback.h" | 15 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
15 #include "base/location.h" | 17 #include "base/location.h" |
16 #include "base/logging.h" | 18 #include "base/logging.h" |
17 #include "base/macros.h" | 19 #include "base/macros.h" |
18 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 XRecordInterceptData* data) { | 312 XRecordInterceptData* data) { |
311 if (data->category == XRecordFromServer) { | 313 if (data->category == XRecordFromServer) { |
312 xEvent* event = reinterpret_cast<xEvent*>(data->data); | 314 xEvent* event = reinterpret_cast<xEvent*>(data->data); |
313 reinterpret_cast<Core*>(self)->ProcessXEvent(event); | 315 reinterpret_cast<Core*>(self)->ProcessXEvent(event); |
314 } | 316 } |
315 XRecordFreeData(data); | 317 XRecordFreeData(data); |
316 } | 318 } |
317 | 319 |
318 } // namespace | 320 } // namespace |
319 | 321 |
320 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( | 322 std::unique_ptr<LocalInputMonitor> LocalInputMonitor::Create( |
321 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 323 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
322 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 324 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
323 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 325 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
324 base::WeakPtr<ClientSessionControl> client_session_control) { | 326 base::WeakPtr<ClientSessionControl> client_session_control) { |
325 return make_scoped_ptr(new LocalInputMonitorX11( | 327 return base::WrapUnique(new LocalInputMonitorX11( |
326 caller_task_runner, input_task_runner, client_session_control)); | 328 caller_task_runner, input_task_runner, client_session_control)); |
327 } | 329 } |
328 | 330 |
329 } // namespace remoting | 331 } // namespace remoting |
OLD | NEW |