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 #ifndef REMOTING_HOST_INPUT_INJECTOR_H_ | 5 #ifndef REMOTING_HOST_INPUT_INJECTOR_H_ |
6 #define REMOTING_HOST_INPUT_INJECTOR_H_ | 6 #define REMOTING_HOST_INPUT_INJECTOR_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "remoting/protocol/clipboard_stub.h" | 10 #include "remoting/protocol/clipboard_stub.h" |
11 #include "remoting/protocol/input_stub.h" | 11 #include "remoting/protocol/input_stub.h" |
12 | 12 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" |
13 namespace base { | 13 namespace base { |
14 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
15 } // namespace base | 15 } // namespace base |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 | 18 |
19 class InputInjector : public protocol::ClipboardStub, | 19 class InputInjector : public protocol::ClipboardStub, |
20 public protocol::InputStub { | 20 public protocol::InputStub { |
21 public: | 21 public: |
22 // Creates a default input injector for the current platform. This | 22 // Creates a default input injector for the current platform. This |
23 // object should do as much work as possible on |main_task_runner|, | 23 // object should do as much work as possible on |main_task_runner|, |
24 // using |ui_task_runner| only for tasks actually requiring a UI | 24 // using |ui_task_runner| only for tasks actually requiring a UI |
25 // thread. | 25 // thread. |
26 static scoped_ptr<InputInjector> Create( | 26 static scoped_ptr<InputInjector> Create( |
27 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 27 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 28 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
29 | 29 |
30 // This method is used to create an InputInjector that is | |
31 // used to input events to a window instead of a screen. | |
32 // See remoting::InputInjectorMac::InjectMouseEvent for | |
33 // an example of how the extra parameters get used. | |
34 static scoped_ptr<InputInjector> CreateForWindow( | |
35 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | |
36 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | |
37 webrtc::WindowId window_id); | |
Wez
2014/08/01 23:41:53
All your windowed input-injection implementation d
Wez
2014/08/01 23:41:53
InputInjector is an interface; you can pull the in
ronakvora do not use
2014/08/05 19:54:49
Done.
ronakvora do not use
2014/08/05 19:54:49
Done.
| |
38 | |
30 // Initialises any objects needed to execute events. | 39 // Initialises any objects needed to execute events. |
31 virtual void Start( | 40 virtual void Start( |
32 scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; | 41 scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; |
42 | |
43 // Enables capturing of a window and gives the id of the window | |
44 // that needs to be captured. | |
45 void EnableWindowInjection(webrtc::WindowId window_id); | |
Wez
2014/08/01 23:41:53
Looks like this got here by mistake?
ronakvora do not use
2014/08/05 19:54:49
I use this in the CreateForWindow method; I think
| |
33 }; | 46 }; |
34 | 47 |
35 } // namespace remoting | 48 } // namespace remoting |
36 | 49 |
37 #endif // REMOTING_HOST_INPUT_INJECTOR_H_ | 50 #endif // REMOTING_HOST_INPUT_INJECTOR_H_ |
OLD | NEW |