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/win/session_input_injector.h" | 5 #include "remoting/host/win/session_input_injector.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 : public base::RefCountedThreadSafe<SessionInputInjectorWin::Core>, | 49 : public base::RefCountedThreadSafe<SessionInputInjectorWin::Core>, |
50 public InputInjector { | 50 public InputInjector { |
51 public: | 51 public: |
52 Core( | 52 Core( |
53 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 53 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
54 scoped_ptr<InputInjector> nested_executor, | 54 scoped_ptr<InputInjector> nested_executor, |
55 scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, | 55 scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, |
56 const base::Closure& inject_sas); | 56 const base::Closure& inject_sas); |
57 | 57 |
58 // InputInjector implementation. | 58 // InputInjector implementation. |
59 virtual void Start(scoped_ptr<ClipboardStub> client_clipboard) override; | 59 void Start(scoped_ptr<ClipboardStub> client_clipboard) override; |
60 | 60 |
61 // protocol::ClipboardStub implementation. | 61 // protocol::ClipboardStub implementation. |
62 virtual void InjectClipboardEvent(const ClipboardEvent& event) override; | 62 void InjectClipboardEvent(const ClipboardEvent& event) override; |
63 | 63 |
64 // protocol::InputStub implementation. | 64 // protocol::InputStub implementation. |
65 virtual void InjectKeyEvent(const KeyEvent& event) override; | 65 void InjectKeyEvent(const KeyEvent& event) override; |
66 virtual void InjectTextEvent(const TextEvent& event) override; | 66 void InjectTextEvent(const TextEvent& event) override; |
67 virtual void InjectMouseEvent(const MouseEvent& event) override; | 67 void InjectMouseEvent(const MouseEvent& event) override; |
68 virtual void InjectTouchEvent(const TouchEvent& event) override; | 68 void InjectTouchEvent(const TouchEvent& event) override; |
69 | 69 |
70 private: | 70 private: |
71 friend class base::RefCountedThreadSafe<Core>; | 71 friend class base::RefCountedThreadSafe<Core>; |
72 virtual ~Core(); | 72 ~Core() override; |
73 | 73 |
74 // Switches to the desktop receiving a user input if different from | 74 // Switches to the desktop receiving a user input if different from |
75 // the current one. | 75 // the current one. |
76 void SwitchToInputDesktop(); | 76 void SwitchToInputDesktop(); |
77 | 77 |
78 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; | 78 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; |
79 | 79 |
80 // Pointer to the next event executor. | 80 // Pointer to the next event executor. |
81 scoped_ptr<InputInjector> nested_executor_; | 81 scoped_ptr<InputInjector> nested_executor_; |
82 | 82 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 const protocol::MouseEvent& event) { | 250 const protocol::MouseEvent& event) { |
251 core_->InjectMouseEvent(event); | 251 core_->InjectMouseEvent(event); |
252 } | 252 } |
253 | 253 |
254 void SessionInputInjectorWin::InjectTouchEvent( | 254 void SessionInputInjectorWin::InjectTouchEvent( |
255 const protocol::TouchEvent& event) { | 255 const protocol::TouchEvent& event) { |
256 core_->InjectTouchEvent(event); | 256 core_->InjectTouchEvent(event); |
257 } | 257 } |
258 | 258 |
259 } // namespace remoting | 259 } // namespace remoting |
OLD | NEW |