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

Side by Side Diff: remoting/host/it2me_desktop_environment.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_IT2ME_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
11 #include "remoting/host/basic_desktop_environment.h" 12 #include "remoting/host/basic_desktop_environment.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 15
15 class HostWindow; 16 class HostWindow;
16 class LocalInputMonitor; 17 class LocalInputMonitor;
17 18
18 // Same as BasicDesktopEnvironment but also presents the Continue window to 19 // Same as BasicDesktopEnvironment but also presents the Continue window to
19 // the local user. 20 // the local user.
20 class It2MeDesktopEnvironment : public BasicDesktopEnvironment { 21 class It2MeDesktopEnvironment : public BasicDesktopEnvironment {
21 public: 22 public:
22 ~It2MeDesktopEnvironment() override; 23 ~It2MeDesktopEnvironment() override;
23 24
24 protected: 25 protected:
25 friend class It2MeDesktopEnvironmentFactory; 26 friend class It2MeDesktopEnvironmentFactory;
26 It2MeDesktopEnvironment( 27 It2MeDesktopEnvironment(
27 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
28 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 29 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 30 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
30 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
31 base::WeakPtr<ClientSessionControl> client_session_control, 32 base::WeakPtr<ClientSessionControl> client_session_control,
32 bool supports_touch_events); 33 bool supports_touch_events);
33 34
34 private: 35 private:
35 // Presents the continue window to the local user. 36 // Presents the continue window to the local user.
36 scoped_ptr<HostWindow> continue_window_; 37 std::unique_ptr<HostWindow> continue_window_;
37 38
38 // Presents the disconnect window to the local user. 39 // Presents the disconnect window to the local user.
39 scoped_ptr<HostWindow> disconnect_window_; 40 std::unique_ptr<HostWindow> disconnect_window_;
40 41
41 // Notifies the client session about the local mouse movements. 42 // Notifies the client session about the local mouse movements.
42 scoped_ptr<LocalInputMonitor> local_input_monitor_; 43 std::unique_ptr<LocalInputMonitor> local_input_monitor_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment); 45 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment);
45 }; 46 };
46 47
47 // Used to create |It2MeDesktopEnvironment| instances. 48 // Used to create |It2MeDesktopEnvironment| instances.
48 class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { 49 class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
49 public: 50 public:
50 It2MeDesktopEnvironmentFactory( 51 It2MeDesktopEnvironmentFactory(
51 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 52 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
52 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 53 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
53 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 54 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
54 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 55 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
55 ~It2MeDesktopEnvironmentFactory() override; 56 ~It2MeDesktopEnvironmentFactory() override;
56 57
57 // DesktopEnvironmentFactory interface. 58 // DesktopEnvironmentFactory interface.
58 scoped_ptr<DesktopEnvironment> Create( 59 std::unique_ptr<DesktopEnvironment> Create(
59 base::WeakPtr<ClientSessionControl> client_session_control) override; 60 base::WeakPtr<ClientSessionControl> client_session_control) override;
60 61
61 private: 62 private:
62 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory); 63 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory);
63 }; 64 };
64 65
65 } // namespace remoting 66 } // namespace remoting
66 67
67 #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ 68 #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host_unittest.cc ('k') | remoting/host/it2me_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698