Chromium Code Reviews| Index: remoting/host/extension.h |
| diff --git a/remoting/host/extension.h b/remoting/host/extension.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3e85817ccec973ea36b1f3b70be7a95979ee40c |
| --- /dev/null |
| +++ b/remoting/host/extension.h |
| @@ -0,0 +1,38 @@ |
| +// 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_EXTENSION_H_ |
| +#define REMOTING_HOST_EXTENSION_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace remoting { |
|
Wez
2014/05/28 01:05:59
Should this belong under remoting::protocol, since
dcaiafa
2014/05/28 22:44:58
Per our offline conversation: it should be under r
|
| + |
| +class ClientSession; |
| +class ExtensionSession; |
| + |
| +// Extends |ChromotingHost| with new functionality, and can use extension |
| +// messages to communicate with the client. |
| +class Extension { |
|
Wez
2014/05/28 01:05:59
Since this is in the remoting namespace, but host-
dcaiafa
2014/05/28 22:44:58
Done.
|
| + public: |
| + // Returns a space-separated list of capabilities provided by this extension. |
| + // Capabilities are used to inform the client of the availability of an |
| + // extension. |
|
Wez
2014/05/28 01:05:59
How? Are they e.g. merged into the capabilities th
dcaiafa
2014/05/28 22:44:58
Done.
|
| + virtual std::string GetCapabilities() = 0; |
| + |
| + // Creates an extension session, which can handle extension messages for a |
| + // client session. |
| + // It may return NULL. |
|
Wez
2014/05/28 01:05:59
Why would it do that? What happens if it does? Sug
dcaiafa
2014/05/28 22:44:58
Done.
|
| + // |client_session| must outlive the resulting |ExtensionSession|. |
| + virtual scoped_ptr<ExtensionSession> CreateExtensionSession( |
| + ClientSession* client_session) = 0; |
|
Wez
2014/05/28 01:05:59
Why do we need to pass the ClientSession in here?
dcaiafa
2014/05/28 22:44:58
So the extension can (among others):
- Query clien
|
| +}; |
| + |
| +typedef std::vector<Extension*> ExtensionList; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_EXTENSION_H_ |