OLD | NEW |
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 <string> | |
9 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
12 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
15 | 13 |
16 namespace base { | 14 namespace base { |
17 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
18 } // namespace base | 16 } // namespace base |
19 | 17 |
20 namespace media { | 18 namespace media { |
21 class ScreenCapturer; | 19 class ScreenCapturer; |
22 } // namespace media | 20 } // namespace media |
23 | 21 |
24 namespace remoting { | 22 namespace remoting { |
25 | 23 |
26 class AudioCapturer; | 24 class AudioCapturer; |
| 25 class Capabilities; |
27 class ClientSessionControl; | 26 class ClientSessionControl; |
28 class InputInjector; | 27 class InputInjector; |
29 class ScreenControls; | 28 class ScreenControls; |
30 | 29 |
31 // Provides factory methods for creation of audio/video capturers and event | 30 // Provides factory methods for creation of audio/video capturers and event |
32 // executor for a given desktop environment. | 31 // executor for a given desktop environment. |
33 class DesktopEnvironment { | 32 class DesktopEnvironment { |
34 public: | 33 public: |
35 virtual ~DesktopEnvironment() {} | 34 virtual ~DesktopEnvironment() {} |
36 | 35 |
37 // Factory methods used to create audio/video capturers, event executor, and | 36 // Factory methods used to create audio/video capturers, event executor, and |
38 // screen controls object for a particular desktop environment. | 37 // screen controls object for a particular desktop environment. |
39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0; | 38 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0; |
40 virtual scoped_ptr<InputInjector> CreateInputInjector() = 0; | 39 virtual scoped_ptr<InputInjector> CreateInputInjector() = 0; |
41 virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0; | 40 virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0; |
42 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() = 0; | 41 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() = 0; |
| 42 |
| 43 // Returns the set of all capabilities supported by |this|. |
| 44 virtual Capabilities GetCapabilities() const = 0; |
| 45 |
| 46 // Passes the final set of capabilities negotiated between the client and host |
| 47 // to |this|. |
| 48 virtual void SetCapabilities(const Capabilities& capabilities) = 0; |
43 }; | 49 }; |
44 | 50 |
45 // Used to create |DesktopEnvironment| instances. | 51 // Used to create |DesktopEnvironment| instances. |
46 class DesktopEnvironmentFactory { | 52 class DesktopEnvironmentFactory { |
47 public: | 53 public: |
48 virtual ~DesktopEnvironmentFactory() {} | 54 virtual ~DesktopEnvironmentFactory() {} |
49 | 55 |
50 // Creates an instance of |DesktopEnvironment|. |client_session_control| must | 56 // Creates an instance of |DesktopEnvironment|. |client_session_control| must |
51 // outlive |this|. | 57 // outlive |this|. |
52 virtual scoped_ptr<DesktopEnvironment> Create( | 58 virtual scoped_ptr<DesktopEnvironment> Create( |
53 base::WeakPtr<ClientSessionControl> client_session_control) = 0; | 59 base::WeakPtr<ClientSessionControl> client_session_control) = 0; |
54 | 60 |
55 // Returns |true| if created |DesktopEnvironment| instances support audio | 61 // Returns |true| if created |DesktopEnvironment| instances support audio |
56 // capture. | 62 // capture. |
57 virtual bool SupportsAudioCapture() const = 0; | 63 virtual bool SupportsAudioCapture() const = 0; |
58 }; | 64 }; |
59 | 65 |
60 } // namespace remoting | 66 } // namespace remoting |
61 | 67 |
62 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 68 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |