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

Unified Diff: remoting/host/chromoting_host.h

Issue 5298001: Use VP8 over PseudoTCP by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed EventExecutor class. Created 10 years, 1 month 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/capturer_mac.cc ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index 2294fdd701862c18b814e947c2764fb4e8299769..aa8cb5f885ea81a957129e363b6b4299380ffe1c 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,10 +64,13 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
public protocol::ConnectionToClient::EventHandler,
public JingleClient::Callback {
public:
- ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config);
- ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config,
- Capturer* capturer);
- virtual ~ChromotingHost();
+ // Factory methods that must be used to create ChromotingHost
+ // instances. Default capturer is used if it is not specified.
+ static ChromotingHost* Create(ChromotingHostContext* context,
+ MutableHostConfig* config);
+ static ChromotingHost* Create(ChromotingHostContext* context,
+ MutableHostConfig* config,
+ Capturer* capturer);
// Asynchronously start the host process.
//
@@ -103,17 +107,22 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
protocol::Session* session,
protocol::SessionManager::IncomingSessionResponse* response);
+ // Sets desired configuration for the protocol. Ownership of the
+ // |config| is transferred to the object. Must be called before Start().
+ void set_protocol_config(protocol::CandidateSessionConfig* config);
+
private:
+ friend class base::RefCountedThreadSafe<ChromotingHost>;
+ ChromotingHost(ChromotingHostContext* context, MutableHostConfig* config,
+ Capturer* capturer);
+ virtual ~ChromotingHost();
+
enum State {
kInitial,
kStarted,
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 +177,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);
};
« no previous file with comments | « remoting/host/capturer_mac.cc ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698