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

Side by Side Diff: remoting/host/me2me_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
« no previous file with comments | « remoting/host/mac/me2me_preference_pane.mm ('k') | remoting/host/me2me_desktop_environment.cc » ('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_ME2ME_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "remoting/host/basic_desktop_environment.h" 9 #include "remoting/host/basic_desktop_environment.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 class CurtainMode; 13 class CurtainMode;
14 class HostWindow; 14 class HostWindow;
15 class LocalInputMonitor; 15 class LocalInputMonitor;
16 16
17 // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE 17 // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE
18 // notifications on Linux. 18 // notifications on Linux.
19 class Me2MeDesktopEnvironment : public BasicDesktopEnvironment { 19 class Me2MeDesktopEnvironment : public BasicDesktopEnvironment {
20 public: 20 public:
21 ~Me2MeDesktopEnvironment() override; 21 ~Me2MeDesktopEnvironment() override;
22 22
23 // DesktopEnvironment interface. 23 // DesktopEnvironment interface.
24 scoped_ptr<ScreenControls> CreateScreenControls() override; 24 std::unique_ptr<ScreenControls> CreateScreenControls() override;
25 std::string GetCapabilities() const override; 25 std::string GetCapabilities() const override;
26 26
27 protected: 27 protected:
28 friend class Me2MeDesktopEnvironmentFactory; 28 friend class Me2MeDesktopEnvironmentFactory;
29 Me2MeDesktopEnvironment( 29 Me2MeDesktopEnvironment(
30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
31 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 31 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
32 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 32 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
34 bool supports_touch_events); 34 bool supports_touch_events);
35 35
36 // Initializes security features of the desktop environment (the curtain mode 36 // Initializes security features of the desktop environment (the curtain mode
37 // and in-session UI). 37 // and in-session UI).
38 bool InitializeSecurity( 38 bool InitializeSecurity(
39 base::WeakPtr<ClientSessionControl> client_session_control, 39 base::WeakPtr<ClientSessionControl> client_session_control,
40 bool curtain_enabled); 40 bool curtain_enabled);
41 41
42 private: 42 private:
43 // "Curtains" the session making sure it is disconnected from the local 43 // "Curtains" the session making sure it is disconnected from the local
44 // console. 44 // console.
45 scoped_ptr<CurtainMode> curtain_; 45 std::unique_ptr<CurtainMode> curtain_;
46 46
47 // Presents the disconnect window to the local user. 47 // Presents the disconnect window to the local user.
48 scoped_ptr<HostWindow> disconnect_window_; 48 std::unique_ptr<HostWindow> disconnect_window_;
49 49
50 // Notifies the client session about the local mouse movements. 50 // Notifies the client session about the local mouse movements.
51 scoped_ptr<LocalInputMonitor> local_input_monitor_; 51 std::unique_ptr<LocalInputMonitor> local_input_monitor_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); 53 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment);
54 }; 54 };
55 55
56 // Used to create |Me2MeDesktopEnvironment| instances. 56 // Used to create |Me2MeDesktopEnvironment| instances.
57 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { 57 class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
58 public: 58 public:
59 Me2MeDesktopEnvironmentFactory( 59 Me2MeDesktopEnvironmentFactory(
60 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 60 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
61 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 61 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
62 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 62 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
64 ~Me2MeDesktopEnvironmentFactory() override; 64 ~Me2MeDesktopEnvironmentFactory() override;
65 65
66 // DesktopEnvironmentFactory interface. 66 // DesktopEnvironmentFactory interface.
67 scoped_ptr<DesktopEnvironment> Create( 67 std::unique_ptr<DesktopEnvironment> Create(
68 base::WeakPtr<ClientSessionControl> client_session_control) override; 68 base::WeakPtr<ClientSessionControl> client_session_control) override;
69 void SetEnableCurtaining(bool enable) override; 69 void SetEnableCurtaining(bool enable) override;
70 70
71 protected: 71 protected:
72 bool curtain_enabled() const { return curtain_enabled_; } 72 bool curtain_enabled() const { return curtain_enabled_; }
73 73
74 private: 74 private:
75 // True if curtain mode is enabled. 75 // True if curtain mode is enabled.
76 bool curtain_enabled_ = false; 76 bool curtain_enabled_ = false;
77 77
78 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); 78 DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory);
79 }; 79 };
80 80
81 } // namespace remoting 81 } // namespace remoting
82 82
83 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ 83 #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/mac/me2me_preference_pane.mm ('k') | remoting/host/me2me_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698