| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace remoting { | 21 namespace remoting { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 class LocalInputMonitorChromeos : public LocalInputMonitor { | 25 class LocalInputMonitorChromeos : public LocalInputMonitor { |
| 26 public: | 26 public: |
| 27 LocalInputMonitorChromeos( | 27 LocalInputMonitorChromeos( |
| 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 30 base::WeakPtr<ClientSessionControl> client_session_control); | 30 base::WeakPtr<ClientSessionControl> client_session_control); |
| 31 virtual ~LocalInputMonitorChromeos(); | 31 ~LocalInputMonitorChromeos() override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 class Core : ui::PlatformEventObserver { | 34 class Core : ui::PlatformEventObserver { |
| 35 public: | 35 public: |
| 36 Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 36 Core(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 37 base::WeakPtr<ClientSessionControl> client_session_control); | 37 base::WeakPtr<ClientSessionControl> client_session_control); |
| 38 ~Core(); | 38 ~Core() override; |
| 39 | 39 |
| 40 void Start(); | 40 void Start(); |
| 41 | 41 |
| 42 // ui::PlatformEventObserver interface. | 42 // ui::PlatformEventObserver interface. |
| 43 void WillProcessEvent(const ui::PlatformEvent& event) override; | 43 void WillProcessEvent(const ui::PlatformEvent& event) override; |
| 44 void DidProcessEvent(const ui::PlatformEvent& event) override; | 44 void DidProcessEvent(const ui::PlatformEvent& event) override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 void HandleMouseMove(const ui::PlatformEvent& event); | 47 void HandleMouseMove(const ui::PlatformEvent& event); |
| 48 void HandleKeyPressed(const ui::PlatformEvent& event); | 48 void HandleKeyPressed(const ui::PlatformEvent& event); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( | 142 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( |
| 143 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 143 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 144 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 144 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 145 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 145 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 146 base::WeakPtr<ClientSessionControl> client_session_control) { | 146 base::WeakPtr<ClientSessionControl> client_session_control) { |
| 147 return make_scoped_ptr(new LocalInputMonitorChromeos( | 147 return make_scoped_ptr(new LocalInputMonitorChromeos( |
| 148 caller_task_runner, input_task_runner, client_session_control)); | 148 caller_task_runner, input_task_runner, client_session_control)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace remoting | 151 } // namespace remoting |
| OLD | NEW |