Index: remoting/host/chromoting_host.h |
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h |
index 2294fdd701862c18b814e947c2764fb4e8299769..d1d85b1be1b0f257641fb232fd1b15bfc1798928 100644 |
--- a/remoting/host/chromoting_host.h |
+++ b/remoting/host/chromoting_host.h |
@@ -26,6 +26,7 @@ class ConnectionToClient; |
class HostStub; |
class InputStub; |
class SessionConfig; |
+class CandidateSessionConfig; |
} // namespace protocol |
class Capturer; |
@@ -63,11 +64,16 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
public protocol::ConnectionToClient::EventHandler, |
public JingleClient::Callback { |
public: |
- ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config); |
ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config, |
dmac
2010/11/23 01:14:57
do we want to leave this exposed if we have the fa
Sergey Ulanov
2010/11/23 01:59:18
Done.
|
Capturer* capturer); |
virtual ~ChromotingHost(); |
+ static ChromotingHost* Create(ChromotingHostContext* context, |
dmac
2010/11/23 01:14:57
Can we comment these?
Sergey Ulanov
2010/11/23 01:59:18
Done.
|
+ MutableHostConfig* config); |
+ static ChromotingHost* Create(ChromotingHostContext* context, |
+ MutableHostConfig* config, |
+ Capturer* capturer); |
+ |
// Asynchronously start the host process. |
// |
// After this is invoked, the host process will connect to the talk |
@@ -103,6 +109,10 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
protocol::Session* session, |
protocol::SessionManager::IncomingSessionResponse* response); |
+ // Sets desired configuration for the protocol. Ownership of the |
+ // |config| is transfered to the object. Must be called before Start(). |
dmac
2010/11/23 01:14:57
s/transfered/transferred
Sergey Ulanov
2010/11/23 01:59:18
Done.
|
+ void set_protocol_config(protocol::CandidateSessionConfig* config); |
dmac
2010/11/23 01:14:57
Should we just pass it in in create?
Sergey Ulanov
2010/11/23 01:59:18
In most cases it is desired to use default config,
|
+ |
private: |
enum State { |
kInitial, |
@@ -110,10 +120,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
kStopped, |
}; |
- // This method connects to the talk network and start listening for incoming |
- // connections. |
- void DoStart(Task* shutdown_task); |
- |
// Callback for protocol::SessionManager::Close(). |
void OnServerClosed(); |
@@ -168,6 +174,9 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
// Lock is to lock the access to |state_|. |
Lock lock_; |
+ // Configuration of the protocol. |
+ scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
}; |