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

Unified Diff: remoting/host/client_session.h

Issue 301453003: Host extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed remoting_host.gypi Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index f8923297df77816725a250ab44a445eb4edae483..a86839ec5875e133f5a6f87a987829cd112aeb40 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -8,6 +8,7 @@
#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"
@@ -15,6 +16,8 @@
#include "base/timer/timer.h"
#include "remoting/host/client_session_control.h"
#include "remoting/host/gnubby_auth_handler.h"
+#include "remoting/host/host_extension.h"
+#include "remoting/host/host_extension_session.h"
#include "remoting/host/mouse_clamping_filter.h"
#include "remoting/host/remote_input_filter.h"
#include "remoting/protocol/clipboard_echo_filter.h"
@@ -64,6 +67,9 @@ class ClientSession
// Called after we've finished connecting all channels.
virtual void OnSessionChannelsConnected(ClientSession* client) = 0;
+ // Called after client has reported capabilities.
+ virtual void OnSessionClientCapabilities(ClientSession* client) = 0;
+
// Called after authentication has failed. Must not tear down this
// object. OnSessionClosed() is notified after this handler
// returns.
@@ -103,6 +109,13 @@ class ClientSession
scoped_refptr<protocol::PairingRegistry> pairing_registry);
virtual ~ClientSession();
+ // Adds an extension to client to handle extension messages.
+ void AddExtensionSession(scoped_ptr<HostExtensionSession> extension_session);
+
+ // Adds extended capabilities to advertise to the client, e.g. those
+ // implemented by |DesktopEnvironment| or |HostExtension|s.
+ void AddHostCapabilities(const std::string& capability);
+
// protocol::HostStub interface.
virtual void NotifyClientResolution(
const protocol::ClientResolution& resolution) OVERRIDE;
@@ -148,7 +161,13 @@ class ClientSession
bool is_authenticated() { return auth_input_filter_.enabled(); }
+ const std::string* client_capabilities() const {
+ return client_capabilities_.get();
+ }
+
private:
+ typedef ScopedVector<HostExtensionSession> HostExtensionSessionList;
+
// Creates a proxy for sending clipboard events to the client.
scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
@@ -244,6 +263,9 @@ class ClientSession
// Used to proxy gnubby auth traffic.
scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_;
+ // Host extension sessions, used to handle extension messages.
+ HostExtensionSessionList extension_sessions_;
+
DISALLOW_COPY_AND_ASSIGN(ClientSession);
};
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698