diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 19:44:18 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 19:44:18 +0000 |
commit | 6ac19647f2749d6f14b9558a8df0d5901e092772 (patch) | |
tree | 76e2aa0075862f3e1678f102d56a7bed83a346f4 /remoting/host/plugin/host_script_object.cc | |
parent | 10b32201cdf40fb21b36c51cafe0f8f8c0040954 (diff) | |
download | chromium_src-6ac19647f2749d6f14b9558a8df0d5901e092772.zip chromium_src-6ac19647f2749d6f14b9558a8df0d5901e092772.tar.gz chromium_src-6ac19647f2749d6f14b9558a8df0d5901e092772.tar.bz2 |
Always enabled audio in remoting host, disable it for It2Me, minor cleanups.
It's not desired to have audio to be enabled by default in It2Me
case. Specifically because in most cases helper and helpee will have separate
audio channel (e.g. Hangout or Skype) that's connected before the session
is started. Don't enable it until we have UI to toggle audio support.
This change also includes some minor code cleanups.
Review URL: https://chromiumcodereview.appspot.com/10928159
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin/host_script_object.cc')
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 7dd58f6b..c4989c6 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -580,7 +580,7 @@ void HostNPScriptObject::FinishConnect( network_settings.max_port = NetworkSettings::kDefaultMaxPort; } - // Create the Host. + // Create the host. host_ = new ChromotingHost( host_context_.get(), signal_strategy_.get(), desktop_environment_factory_.get(), @@ -589,17 +589,30 @@ void HostNPScriptObject::FinishConnect( host_->AddStatusObserver(this); log_to_server_.reset( new LogToServer(host_, ServerLogEntry::IT2ME, signal_strategy_.get())); - base::Closure disconnect_callback = base::Bind( - &ChromotingHost::Shutdown, base::Unretained(host_.get()), - base::Closure()); - it2me_host_user_interface_->Start(host_.get(), disconnect_callback); - host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); + // Disable audio by default. + // TODO(sergeyu): Add UI to enable it. + scoped_ptr<protocol::CandidateSessionConfig> protocol_config = + protocol::CandidateSessionConfig::CreateDefault(); + protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get()); + host_->set_protocol_config(protocol_config.Pass()); + + // Provide localization strings to the host. { base::AutoLock auto_lock(ui_strings_lock_); host_->SetUiStrings(ui_strings_); } + // Create user interface. + base::Closure disconnect_callback = base::Bind( + &ChromotingHost::Shutdown, base::Unretained(host_.get()), + base::Closure()); + it2me_host_user_interface_->Start(host_.get(), disconnect_callback); + + // Create event logger. + host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); + + // Connect signaling and start the host. signal_strategy_->Connect(); host_->Start(uid); |