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

Side by Side Diff: remoting/host/plugin/host_script_object.cc

Issue 11260053: Use correct thread for audio capturing and encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 #include "remoting/host/plugin/host_script_object.h" 5 #include "remoting/host/plugin/host_script_object.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 network_settings.min_port = NetworkSettings::kDefaultMinPort; 366 network_settings.min_port = NetworkSettings::kDefaultMinPort;
367 network_settings.max_port = NetworkSettings::kDefaultMaxPort; 367 network_settings.max_port = NetworkSettings::kDefaultMaxPort;
368 } 368 }
369 369
370 // Create the host. 370 // Create the host.
371 host_ = new ChromotingHost( 371 host_ = new ChromotingHost(
372 signal_strategy_.get(), 372 signal_strategy_.get(),
373 desktop_environment_factory_.get(), 373 desktop_environment_factory_.get(),
374 CreateHostSessionManager(network_settings, 374 CreateHostSessionManager(network_settings,
375 host_context_->url_request_context_getter()), 375 host_context_->url_request_context_getter()),
376 host_context_->audio_task_runner(),
376 host_context_->capture_task_runner(), 377 host_context_->capture_task_runner(),
377 host_context_->encode_task_runner(), 378 host_context_->encode_task_runner(),
378 host_context_->network_task_runner()); 379 host_context_->network_task_runner());
379 host_->AddStatusObserver(this); 380 host_->AddStatusObserver(this);
380 log_to_server_.reset( 381 log_to_server_.reset(
381 new LogToServer(host_, ServerLogEntry::IT2ME, signal_strategy_.get())); 382 new LogToServer(host_, ServerLogEntry::IT2ME, signal_strategy_.get()));
382 383
383 // Disable audio by default. 384 // Disable audio by default.
384 // TODO(sergeyu): Add UI to enable it. 385 // TODO(sergeyu): Add UI to enable it.
385 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = 386 scoped_ptr<protocol::CandidateSessionConfig> protocol_config =
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 } 1519 }
1519 1520
1520 void HostNPScriptObject::SetException(const std::string& exception_string) { 1521 void HostNPScriptObject::SetException(const std::string& exception_string) {
1521 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 1522 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
1522 1523
1523 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); 1524 g_npnetscape_funcs->setexception(parent_, exception_string.c_str());
1524 LOG(INFO) << exception_string; 1525 LOG(INFO) << exception_string;
1525 } 1526 }
1526 1527
1527 } // namespace remoting 1528 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698