Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: remoting/host/input_injector.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/host_window_proxy.cc ('k') | remoting/host/input_injector_chromeos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/protocol/clipboard_stub.h" 11 #include "remoting/protocol/clipboard_stub.h"
11 #include "remoting/protocol/input_stub.h" 12 #include "remoting/protocol/input_stub.h"
12 13
13 namespace base { 14 namespace base {
14 class SingleThreadTaskRunner; 15 class SingleThreadTaskRunner;
15 } // namespace base 16 } // namespace base
16 17
17 namespace remoting { 18 namespace remoting {
18 19
19 // TODO(sergeyu): Move ClipboardStub implementation to Clipboard. 20 // TODO(sergeyu): Move ClipboardStub implementation to Clipboard.
20 class InputInjector : public protocol::ClipboardStub, 21 class InputInjector : public protocol::ClipboardStub,
21 public protocol::InputStub { 22 public protocol::InputStub {
22 public: 23 public:
23 // Creates a default input injector for the current platform. This 24 // Creates a default input injector for the current platform. This
24 // object should do as much work as possible on |main_task_runner|, 25 // object should do as much work as possible on |main_task_runner|,
25 // using |ui_task_runner| only for tasks actually requiring a UI 26 // using |ui_task_runner| only for tasks actually requiring a UI
26 // thread. 27 // thread.
27 static scoped_ptr<InputInjector> Create( 28 static std::unique_ptr<InputInjector> Create(
28 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 29 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
29 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 30 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
30 31
31 // Returns true if the InputInjector returned by Create() supports 32 // Returns true if the InputInjector returned by Create() supports
32 // InjectTouchEvent() on this platform. 33 // InjectTouchEvent() on this platform.
33 static bool SupportsTouchEvents(); 34 static bool SupportsTouchEvents();
34 35
35 // Initialises any objects needed to execute events. 36 // Initialises any objects needed to execute events.
36 virtual void Start( 37 virtual void Start(
37 scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; 38 std::unique_ptr<protocol::ClipboardStub> client_clipboard) = 0;
38 }; 39 };
39 40
40 } // namespace remoting 41 } // namespace remoting
41 42
42 #endif // REMOTING_HOST_INPUT_INJECTOR_H_ 43 #endif // REMOTING_HOST_INPUT_INJECTOR_H_
OLDNEW
« no previous file with comments | « remoting/host/host_window_proxy.cc ('k') | remoting/host/input_injector_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698