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

Side by Side Diff: remoting/host/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/desktop_capturer_proxy.cc ('k') | remoting/host/desktop_process.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_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 14
15 namespace base { 15 namespace base {
16 class SingleThreadTaskRunner; 16 class SingleThreadTaskRunner;
17 } // namespace base 17 } // namespace base
18 18
19 namespace webrtc { 19 namespace webrtc {
20 class DesktopCapturer; 20 class DesktopCapturer;
21 class MouseCursorMonitor; 21 class MouseCursorMonitor;
22 } // namespace webrtc 22 } // namespace webrtc
(...skipping 10 matching lines...) Expand all
33 class ScreenControls; 33 class ScreenControls;
34 34
35 // Provides factory methods for creation of audio/video capturers and event 35 // Provides factory methods for creation of audio/video capturers and event
36 // executor for a given desktop environment. 36 // executor for a given desktop environment.
37 class DesktopEnvironment { 37 class DesktopEnvironment {
38 public: 38 public:
39 virtual ~DesktopEnvironment() {} 39 virtual ~DesktopEnvironment() {}
40 40
41 // Factory methods used to create audio/video capturers, event executor, and 41 // Factory methods used to create audio/video capturers, event executor, and
42 // screen controls object for a particular desktop environment. 42 // screen controls object for a particular desktop environment.
43 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0; 43 virtual std::unique_ptr<AudioCapturer> CreateAudioCapturer() = 0;
44 virtual scoped_ptr<InputInjector> CreateInputInjector() = 0; 44 virtual std::unique_ptr<InputInjector> CreateInputInjector() = 0;
45 virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0; 45 virtual std::unique_ptr<ScreenControls> CreateScreenControls() = 0;
46 virtual scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() = 0; 46 virtual std::unique_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() = 0;
47 virtual scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() = 0; 47 virtual std::unique_ptr<webrtc::MouseCursorMonitor>
48 CreateMouseCursorMonitor() = 0;
48 49
49 // Returns the set of all capabilities supported by |this|. 50 // Returns the set of all capabilities supported by |this|.
50 virtual std::string GetCapabilities() const = 0; 51 virtual std::string GetCapabilities() const = 0;
51 52
52 // Passes the final set of capabilities negotiated between the client and host 53 // Passes the final set of capabilities negotiated between the client and host
53 // to |this|. 54 // to |this|.
54 virtual void SetCapabilities(const std::string& capabilities) = 0; 55 virtual void SetCapabilities(const std::string& capabilities) = 0;
55 }; 56 };
56 57
57 // Used to create |DesktopEnvironment| instances. 58 // Used to create |DesktopEnvironment| instances.
58 class DesktopEnvironmentFactory { 59 class DesktopEnvironmentFactory {
59 public: 60 public:
60 virtual ~DesktopEnvironmentFactory() {} 61 virtual ~DesktopEnvironmentFactory() {}
61 62
62 // Creates an instance of |DesktopEnvironment|. Returns a nullptr pointer if 63 // Creates an instance of |DesktopEnvironment|. Returns a nullptr pointer if
63 // the desktop environment could not be created for any reason (if the curtain 64 // the desktop environment could not be created for any reason (if the curtain
64 // failed to active for instance). |client_session_control| must outlive 65 // failed to active for instance). |client_session_control| must outlive
65 // the created desktop environment. 66 // the created desktop environment.
66 virtual scoped_ptr<DesktopEnvironment> Create( 67 virtual std::unique_ptr<DesktopEnvironment> Create(
67 base::WeakPtr<ClientSessionControl> client_session_control) = 0; 68 base::WeakPtr<ClientSessionControl> client_session_control) = 0;
68 69
69 // Enables or disables the curtain mode. 70 // Enables or disables the curtain mode.
70 virtual void SetEnableCurtaining(bool enable) {} 71 virtual void SetEnableCurtaining(bool enable) {}
71 72
72 // Returns |true| if created |DesktopEnvironment| instances support audio 73 // Returns |true| if created |DesktopEnvironment| instances support audio
73 // capture. 74 // capture.
74 virtual bool SupportsAudioCapture() const = 0; 75 virtual bool SupportsAudioCapture() const = 0;
75 }; 76 };
76 77
77 } // namespace remoting 78 } // namespace remoting
78 79
79 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 80 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_capturer_proxy.cc ('k') | remoting/host/desktop_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698