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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 10823224: Update JingleThreadWrapper to allow it to be created using task runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 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/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 460 }
461 461
462 void ChromotingInstance::OnFirstFrameReceived() { 462 void ChromotingInstance::OnFirstFrameReceived() {
463 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); 463 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
464 PostChromotingMessage("onFirstFrameReceived", data.Pass()); 464 PostChromotingMessage("onFirstFrameReceived", data.Pass());
465 } 465 }
466 466
467 void ChromotingInstance::Connect(const ClientConfig& config) { 467 void ChromotingInstance::Connect(const ClientConfig& config) {
468 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 468 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
469 469
470 jingle_glue::JingleThreadWrapper::EnsureForCurrentThread(); 470 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
471 471
472 host_connection_.reset(new protocol::ConnectionToHost(true)); 472 host_connection_.reset(new protocol::ConnectionToHost(true));
473 scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this)); 473 scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this));
474 client_.reset(new ChromotingClient(config, &context_, 474 client_.reset(new ChromotingClient(config, &context_,
475 host_connection_.get(), this, 475 host_connection_.get(), this,
476 rectangle_decoder_.get(), 476 rectangle_decoder_.get(),
477 audio_player.Pass())); 477 audio_player.Pass()));
478 478
479 // Construct the input pipeline 479 // Construct the input pipeline
480 mouse_input_filter_.reset( 480 mouse_input_filter_.reset(
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 PostChromotingMessage("logDebugMessage", data.Pass()); 746 PostChromotingMessage("logDebugMessage", data.Pass());
747 g_logging_to_plugin = false; 747 g_logging_to_plugin = false;
748 } 748 }
749 749
750 bool ChromotingInstance::IsConnected() { 750 bool ChromotingInstance::IsConnected() {
751 return host_connection_.get() && 751 return host_connection_.get() &&
752 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); 752 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED);
753 } 753 }
754 754
755 } // namespace remoting 755 } // namespace remoting
OLDNEW
« no previous file with comments | « jingle/glue/thread_wrapper_unittest.cc ('k') | remoting/protocol/libjingle_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698