Chromium Code Reviews| Index: remoting/host/client_session.h |
| diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h |
| index a86839ec5875e133f5a6f87a987829cd112aeb40..9dbfeb55ea43f8d23ac8b5ab71656df9ba9135f0 100644 |
| --- a/remoting/host/client_session.h |
| +++ b/remoting/host/client_session.h |
| @@ -30,6 +30,7 @@ |
| #include "remoting/protocol/input_stub.h" |
| #include "remoting/protocol/pairing_registry.h" |
| #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| +#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -165,6 +166,27 @@ class ClientSession |
| return client_capabilities_.get(); |
| } |
| + // Setting enable_cast notifies ClientSession that cast-mode is |
| + // supported by the host. Enabling cast mode means that if requested by |
| + // the client, the ClientSession may switch from default video streaming |
| + // to using WebRTC, via the CastExtension mechanism. If the ClientSession |
| + // receives no request, video streaming carries on normally. This switch is |
| + // currently allowed on a per-session basis, i.e., if the client requests |
| + // cast mode but then wants to switch back, it must reconnect. |
| + void set_enable_cast(bool enable) { enable_cast_ = enable; } |
| + |
| + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner() { |
| + return network_task_runner_; |
| + } |
| + |
| + scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner() { |
|
Sergey Ulanov
2014/07/24 19:11:36
I'm not sure why you need these methods here. Can
aiguha
2014/07/28 17:11:56
Yes I can pass the task runners to the extension c
Sergey Ulanov
2014/07/28 17:19:06
Yes - it's the same mechanism we use in other plac
aiguha
2014/07/28 17:44:33
Done.
|
| + return video_capture_task_runner_; |
| + } |
| + |
| + // Stops the VideoScheduler (which stops capturing, encoding and streaming) |
| + // and passes a new ScreenCapturer to the caller. |
| + scoped_ptr<webrtc::ScreenCapturer> RequestScreenCapturer(); |
| + |
| private: |
| typedef ScopedVector<HostExtensionSession> HostExtensionSessionList; |
| @@ -266,6 +288,9 @@ class ClientSession |
| // Host extension sessions, used to handle extension messages. |
| HostExtensionSessionList extension_sessions_; |
| + // True if cast mode is enabled on the host. |
| + bool enable_cast_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ClientSession); |
| }; |