Chromium Code Reviews| Index: remoting/host/client_session.h |
| diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h |
| index f8923297df77816725a250ab44a445eb4edae483..e6e200aaa300ccae2dc6f7110a0038e6cbc0187d 100644 |
| --- a/remoting/host/client_session.h |
| +++ b/remoting/host/client_session.h |
| @@ -8,12 +8,15 @@ |
| #include <string> |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_vector.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/sequenced_task_runner_helpers.h" |
| #include "base/threading/non_thread_safe.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| #include "remoting/host/client_session_control.h" |
| +#include "remoting/host/extension.h" |
| +#include "remoting/host/extension_session.h" |
| #include "remoting/host/gnubby_auth_handler.h" |
| #include "remoting/host/mouse_clamping_filter.h" |
| #include "remoting/host/remote_input_filter.h" |
| @@ -88,7 +91,8 @@ class ClientSession |
| virtual ~EventHandler() {} |
| }; |
| - // |event_handler| and |desktop_environment_factory| must outlive |this|. |
| + // |event_handler|, |desktop_environment_factory| and |extensions| must |
| + // outlive |this|. |
| ClientSession( |
| EventHandler* event_handler, |
| scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
| @@ -100,7 +104,8 @@ class ClientSession |
| scoped_ptr<protocol::ConnectionToClient> connection, |
| DesktopEnvironmentFactory* desktop_environment_factory, |
| const base::TimeDelta& max_duration, |
| - scoped_refptr<protocol::PairingRegistry> pairing_registry); |
| + scoped_refptr<protocol::PairingRegistry> pairing_registry, |
| + const ExtensionList* extensions); |
|
Wez
2014/05/28 01:05:59
Ouch. It's a shame to have to keep a bare pointer
dcaiafa
2014/05/28 22:44:58
Removed.
|
| virtual ~ClientSession(); |
| // protocol::HostStub interface. |
| @@ -149,6 +154,8 @@ class ClientSession |
| bool is_authenticated() { return auth_input_filter_.enabled(); } |
| private: |
| + typedef ScopedVector<ExtensionSession> ExtensionSessionList; |
| + |
| // Creates a proxy for sending clipboard events to the client. |
| scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy(); |
| @@ -160,6 +167,10 @@ class ClientSession |
| static scoped_ptr<VideoEncoder> CreateVideoEncoder( |
| const protocol::SessionConfig& config); |
| + // Creates extension sessions for this client. Must be called after the client |
| + // has reported its capabilities. |
| + void CreateExtensionSessions(); |
| + |
| EventHandler* event_handler_; |
| // The connection to the client. |
| @@ -244,6 +255,13 @@ class ClientSession |
| // Used to proxy gnubby auth traffic. |
| scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_; |
| + // List of host extensions. |
| + const ExtensionList* extensions_; |
| + |
| + // List of host extension sessions. These are created from |extensions_|, |
| + // which are shared by all clients, specifically for this client. |
| + ExtensionSessionList extension_sessions_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ClientSession); |
| }; |