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

Side by Side Diff: remoting/host/remoting_me2me_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/it2me/it2me_host.cc ('k') | remoting/protocol/connection_to_host_impl.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 #else // !defined(NDEBUG) 1517 #else // !defined(NDEBUG)
1518 LOG(ERROR) << "WebRTC is enabled only in debug builds."; 1518 LOG(ERROR) << "WebRTC is enabled only in debug builds.";
1519 ShutdownHost(kUsageExitCode); 1519 ShutdownHost(kUsageExitCode);
1520 return; 1520 return;
1521 #endif // defined(NDEBUG) 1521 #endif // defined(NDEBUG)
1522 } else { 1522 } else {
1523 transport_factory.reset( 1523 transport_factory.reset(
1524 new protocol::IceTransportFactory(transport_context)); 1524 new protocol::IceTransportFactory(transport_context));
1525 } 1525 }
1526 scoped_ptr<protocol::SessionManager> session_manager( 1526 scoped_ptr<protocol::SessionManager> session_manager(
1527 new protocol::JingleSessionManager(transport_factory.Pass())); 1527 new protocol::JingleSessionManager(transport_factory.Pass(),
1528 signal_strategy_.get()));
1528 1529
1529 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = 1530 scoped_ptr<protocol::CandidateSessionConfig> protocol_config =
1530 protocol::CandidateSessionConfig::CreateDefault(); 1531 protocol::CandidateSessionConfig::CreateDefault();
1531 if (!desktop_environment_factory_->SupportsAudioCapture()) 1532 if (!desktop_environment_factory_->SupportsAudioCapture())
1532 protocol_config->DisableAudioChannel(); 1533 protocol_config->DisableAudioChannel();
1533 if (enable_vp9_) 1534 if (enable_vp9_)
1534 protocol_config->set_vp9_experiment_enabled(true); 1535 protocol_config->set_vp9_experiment_enabled(true);
1535 #if !defined(NDEBUG) 1536 #if !defined(NDEBUG)
1536 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableWebrtc)) { 1537 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableWebrtc)) {
1537 protocol_config->set_webrtc_supported(true); 1538 protocol_config->set_webrtc_supported(true);
1538 } 1539 }
1539 #endif // !defined(NDEBUG) 1540 #endif // !defined(NDEBUG)
1540 session_manager->set_protocol_config(protocol_config.Pass()); 1541 session_manager->set_protocol_config(protocol_config.Pass());
1541 1542
1542 host_.reset(new ChromotingHost( 1543 host_.reset(new ChromotingHost(
1543 signal_strategy_.get(), desktop_environment_factory_.get(), 1544 desktop_environment_factory_.get(),
1544 session_manager.Pass(), context_->audio_task_runner(), 1545 session_manager.Pass(), context_->audio_task_runner(),
1545 context_->input_task_runner(), context_->video_capture_task_runner(), 1546 context_->input_task_runner(), context_->video_capture_task_runner(),
1546 context_->video_encode_task_runner(), context_->network_task_runner(), 1547 context_->video_encode_task_runner(), context_->network_task_runner(),
1547 context_->ui_task_runner())); 1548 context_->ui_task_runner()));
1548 1549
1549 if (frame_recorder_buffer_size_ > 0) { 1550 if (frame_recorder_buffer_size_ > 0) {
1550 scoped_ptr<VideoFrameRecorderHostExtension> frame_recorder_extension( 1551 scoped_ptr<VideoFrameRecorderHostExtension> frame_recorder_extension(
1551 new VideoFrameRecorderHostExtension()); 1552 new VideoFrameRecorderHostExtension());
1552 frame_recorder_extension->SetMaxContentBytes(frame_recorder_buffer_size_); 1553 frame_recorder_extension->SetMaxContentBytes(frame_recorder_buffer_size_);
1553 host_->AddExtension(frame_recorder_extension.Pass()); 1554 host_->AddExtension(frame_recorder_extension.Pass());
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1748 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1748 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); 1749 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog);
1749 1750
1750 // Run the main (also UI) message loop until the host no longer needs it. 1751 // Run the main (also UI) message loop until the host no longer needs it.
1751 message_loop.Run(); 1752 message_loop.Run();
1752 1753
1753 return exit_code; 1754 return exit_code;
1754 } 1755 }
1755 1756
1756 } // namespace remoting 1757 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | remoting/protocol/connection_to_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698