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

Side by Side Diff: remoting/host/it2me/it2me_host.cc

Issue 1530523002: More cleanups in JingleSessionManager interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@transport_context
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/it2me/it2me_host.h" 5 #include "remoting/host/it2me/it2me_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 scoped_ptr<protocol::TransportFactory> transport_factory( 234 scoped_ptr<protocol::TransportFactory> transport_factory(
235 new protocol::IceTransportFactory(new protocol::TransportContext( 235 new protocol::IceTransportFactory(new protocol::TransportContext(
236 signal_strategy_.get(), 236 signal_strategy_.get(),
237 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( 237 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory(
238 host_context_->url_request_context_getter())), 238 host_context_->url_request_context_getter())),
239 network_settings, protocol::TransportRole::SERVER))); 239 network_settings, protocol::TransportRole::SERVER)));
240 240
241 scoped_ptr<protocol::SessionManager> session_manager( 241 scoped_ptr<protocol::SessionManager> session_manager(
242 new protocol::JingleSessionManager(transport_factory.Pass())); 242 new protocol::JingleSessionManager(transport_factory.Pass(),
243 signal_strategy.get()));
243 244
244 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = 245 scoped_ptr<protocol::CandidateSessionConfig> protocol_config =
245 protocol::CandidateSessionConfig::CreateDefault(); 246 protocol::CandidateSessionConfig::CreateDefault();
246 // Disable audio by default. 247 // Disable audio by default.
247 // TODO(sergeyu): Add UI to enable it. 248 // TODO(sergeyu): Add UI to enable it.
248 protocol_config->DisableAudioChannel(); 249 protocol_config->DisableAudioChannel();
249 session_manager->set_protocol_config(protocol_config.Pass()); 250 session_manager->set_protocol_config(protocol_config.Pass());
250 251
251 // Create the host. 252 // Create the host.
252 host_.reset(new ChromotingHost( 253 host_.reset(new ChromotingHost(
253 signal_strategy_.get(), desktop_environment_factory_.get(), 254 desktop_environment_factory_.get(),
254 session_manager.Pass(), host_context_->audio_task_runner(), 255 session_manager.Pass(), host_context_->audio_task_runner(),
255 host_context_->input_task_runner(), 256 host_context_->input_task_runner(),
256 host_context_->video_capture_task_runner(), 257 host_context_->video_capture_task_runner(),
257 host_context_->video_encode_task_runner(), 258 host_context_->video_encode_task_runner(),
258 host_context_->network_task_runner(), host_context_->ui_task_runner())); 259 host_context_->network_task_runner(), host_context_->ui_task_runner()));
259 host_->AddStatusObserver(this); 260 host_->AddStatusObserver(this);
260 host_status_logger_.reset( 261 host_status_logger_.reset(
261 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME, 262 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME,
262 signal_strategy_.get(), directory_bot_jid_)); 263 signal_strategy_.get(), directory_bot_jid_));
263 264
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( 489 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory(
489 new It2MeConfirmationDialogFactory()); 490 new It2MeConfirmationDialogFactory());
490 scoped_ptr<PolicyWatcher> policy_watcher = 491 scoped_ptr<PolicyWatcher> policy_watcher =
491 PolicyWatcher::Create(policy_service_, context->file_task_runner()); 492 PolicyWatcher::Create(policy_service_, context->file_task_runner());
492 return new It2MeHost(context.Pass(), policy_watcher.Pass(), 493 return new It2MeHost(context.Pass(), policy_watcher.Pass(),
493 confirmation_dialog_factory.Pass(), 494 confirmation_dialog_factory.Pass(),
494 observer, xmpp_server_config, directory_bot_jid); 495 observer, xmpp_server_config, directory_bot_jid);
495 } 496 }
496 497
497 } // namespace remoting 498 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698