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

Unified Diff: remoting/host/chromoting_host.cc

Issue 10538091: [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for Windows. Created 8 years, 6 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.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 81f87bc2d33382e86afb194a1c6522814953e9bb..4aa776801a72b8d364e161182cdb61fb20d4f2ae 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -17,14 +17,11 @@
#include "remoting/host/desktop_environment.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/host_config.h"
-#include "remoting/host/host_port_allocator.h"
#include "remoting/host/screen_recorder.h"
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/client_stub.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/input_stub.h"
-#include "remoting/protocol/jingle_session_manager.h"
-#include "remoting/protocol/libjingle_transport_factory.h"
#include "remoting/protocol/session_config.h"
using remoting::protocol::ConnectionToClient;
@@ -66,10 +63,10 @@ ChromotingHost::ChromotingHost(
ChromotingHostContext* context,
SignalStrategy* signal_strategy,
DesktopEnvironment* environment,
- const NetworkSettings& network_settings)
+ scoped_ptr<protocol::SessionManager> session_manager)
: context_(context),
desktop_environment_(environment),
- network_settings_(network_settings),
+ session_manager_(session_manager.Pass()),
signal_strategy_(signal_strategy),
stopping_recorders_(0),
state_(kInitial),
@@ -97,24 +94,7 @@ void ChromotingHost::Start() {
return;
state_ = kStarted;
- // Create port allocator and transport factory.
- scoped_ptr<HostPortAllocator> port_allocator(
- HostPortAllocator::Create(context_->url_request_context_getter(),
- network_settings_));
-
- bool incoming_only = network_settings_.nat_traversal_mode ==
- NetworkSettings::NAT_TRAVERSAL_DISABLED;
-
- scoped_ptr<protocol::TransportFactory> transport_factory(
- new protocol::LibjingleTransportFactory(
- port_allocator.PassAs<cricket::HttpPortAllocatorBase>(),
- incoming_only));
-
- // Create and start session manager.
- bool fetch_stun_relay_info = network_settings_.nat_traversal_mode ==
- NetworkSettings::NAT_TRAVERSAL_ENABLED;
- session_manager_.reset(new protocol::JingleSessionManager(
- transport_factory.Pass(), fetch_stun_relay_info));
+ // Start the SessionManager, supplying this ChromotingHost as the listener.
session_manager_->Init(signal_strategy_, this);
}
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698