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

Unified Diff: remoting/host/host_extension.h

Issue 301453003: Host extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromotingHost creates extension sessions, and adds capabilities 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
Index: remoting/host/host_extension.h
diff --git a/remoting/host/host_extension.h b/remoting/host/host_extension.h
new file mode 100644
index 0000000000000000000000000000000000000000..e8fbc84771a15da2aff67c4359b2c3f4be14271e
--- /dev/null
+++ b/remoting/host/host_extension.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_HOST_EXTENSION_H_
+#define REMOTING_HOST_HOST_EXTENSION_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+
+namespace remoting {
+
+class ClientSession;
+class HostExtensionSession;
+
+// Extends |ChromotingHost| with new functionality, and can use extension
+// messages to communicate with the client.
+class HostExtension {
+ public:
+ virtual ~HostExtension() {}
+
+ // Returns a space-separated list of capabilities provided by this extension.
+ // Capabilities are used to inform the client of the availability of an
Wez 2014/05/28 23:03:41 nit: "... may be used ..." - we don't require this
dcaiafa 2014/05/29 00:03:16 Done.
+ // extension. They are merged into the capabilities the host reports to the
+ // client.
+ virtual std::string GetCapabilities() = 0;
+
+ // Creates an extension session, which can handle extension messages for a
+ // client session.
+ // If NULL is returned, then the extension will not be available to the client
+ // session.
Wez 2014/05/28 23:03:41 nit: I'd suggest "NULL may be returned if |client_
dcaiafa 2014/05/29 00:03:16 Done.
+ // |client_session| must outlive the resulting |HostExtensionSession|.
+ virtual scoped_ptr<HostExtensionSession> CreateExtensionSession(
+ ClientSession* client_session) = 0;
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_HOST_EXTENSION_H_

Powered by Google App Engine
This is Rietveld 408576698