Chromium Code Reviews| 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 <cstdint> | |
| 8 #include <memory> | 9 #include <memory> |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 | 15 |
| 15 namespace base { | 16 namespace base { |
| 16 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
| 17 } // namespace base | 18 } // namespace base |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 46 virtual std::unique_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() = 0; | 47 virtual std::unique_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() = 0; |
| 47 virtual std::unique_ptr<webrtc::MouseCursorMonitor> | 48 virtual std::unique_ptr<webrtc::MouseCursorMonitor> |
| 48 CreateMouseCursorMonitor() = 0; | 49 CreateMouseCursorMonitor() = 0; |
| 49 | 50 |
| 50 // Returns the set of all capabilities supported by |this|. | 51 // Returns the set of all capabilities supported by |this|. |
| 51 virtual std::string GetCapabilities() const = 0; | 52 virtual std::string GetCapabilities() const = 0; |
| 52 | 53 |
| 53 // Passes the final set of capabilities negotiated between the client and host | 54 // Passes the final set of capabilities negotiated between the client and host |
| 54 // to |this|. | 55 // to |this|. |
| 55 virtual void SetCapabilities(const std::string& capabilities) = 0; | 56 virtual void SetCapabilities(const std::string& capabilities) = 0; |
| 57 | |
| 58 // Returns an id which identifies the current desktop session. | |
|
Sergey Ulanov
2016/06/23 22:35:53
Please make it clear that this ID is platform-spec
joedow
2016/06/23 23:26:04
Done.
| |
| 59 virtual uint32_t GetDesktopSessionId() const = 0; | |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 // Used to create |DesktopEnvironment| instances. | 62 // Used to create |DesktopEnvironment| instances. |
| 59 class DesktopEnvironmentFactory { | 63 class DesktopEnvironmentFactory { |
| 60 public: | 64 public: |
| 61 virtual ~DesktopEnvironmentFactory() {} | 65 virtual ~DesktopEnvironmentFactory() {} |
| 62 | 66 |
| 63 // Creates an instance of |DesktopEnvironment|. Returns a nullptr pointer if | 67 // Creates an instance of |DesktopEnvironment|. Returns a nullptr pointer if |
| 64 // the desktop environment could not be created for any reason (if the curtain | 68 // the desktop environment could not be created for any reason (if the curtain |
| 65 // failed to active for instance). |client_session_control| must outlive | 69 // failed to active for instance). |client_session_control| must outlive |
| 66 // the created desktop environment. | 70 // the created desktop environment. |
| 67 virtual std::unique_ptr<DesktopEnvironment> Create( | 71 virtual std::unique_ptr<DesktopEnvironment> Create( |
| 68 base::WeakPtr<ClientSessionControl> client_session_control) = 0; | 72 base::WeakPtr<ClientSessionControl> client_session_control) = 0; |
| 69 | 73 |
| 70 // Enables or disables the curtain mode. | 74 // Enables or disables the curtain mode. |
| 71 virtual void SetEnableCurtaining(bool enable) {} | 75 virtual void SetEnableCurtaining(bool enable) {} |
| 72 | 76 |
| 73 // Returns |true| if created |DesktopEnvironment| instances support audio | 77 // Returns |true| if created |DesktopEnvironment| instances support audio |
| 74 // capture. | 78 // capture. |
| 75 virtual bool SupportsAudioCapture() const = 0; | 79 virtual bool SupportsAudioCapture() const = 0; |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace remoting | 82 } // namespace remoting |
| 79 | 83 |
| 80 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 84 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| OLD | NEW |