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 #ifndef REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ | 5 #ifndef REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ |
6 #define REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ | 6 #define REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
9 #include "remoting/host/input_injector.h" | 10 #include "remoting/host/input_injector.h" |
10 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" | 11 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" |
11 | 12 |
12 namespace remoting { | 13 namespace remoting { |
13 | 14 |
14 // This class is used to wrap an InputInjector. All this class does | 15 // This class is used to wrap an InputInjector. All this class does |
15 // is forward messages to the wrapped InputInjector. When a MouseEvent | 16 // is forward messages to the wrapped InputInjector. When a MouseEvent |
16 // comes in, SingleWindowInputInjector adjusts the MouseEvent's | 17 // comes in, SingleWindowInputInjector adjusts the MouseEvent's |
17 // coordinates so that they are in respect to the window instead of | 18 // coordinates so that they are in respect to the window instead of |
18 // the desktop. Clipboard, Text, and Key events are still global. | 19 // the desktop. Clipboard, Text, and Key events are still global. |
19 class SingleWindowInputInjector : public InputInjector { | 20 class SingleWindowInputInjector : public InputInjector { |
20 public: | 21 public: |
21 // This Create method needs to be passed a full desktop | 22 // This Create method needs to be passed a full desktop |
22 // InputInjector. | 23 // InputInjector. |
23 static scoped_ptr<InputInjector> CreateForWindow( | 24 static std::unique_ptr<InputInjector> CreateForWindow( |
24 webrtc::WindowId window_id, | 25 webrtc::WindowId window_id, |
25 scoped_ptr<InputInjector> input_injector); | 26 std::unique_ptr<InputInjector> input_injector); |
26 }; | 27 }; |
27 | 28 |
28 } // namespace remoting | 29 } // namespace remoting |
29 | 30 |
30 #endif // REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ | 31 #endif // REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_ |
OLD | NEW |