| OLD | NEW |
| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 394 } |
| 395 LOG(ERROR) << "Unable to get ScriptableObject for Chromoting plugin."; | 395 LOG(ERROR) << "Unable to get ScriptableObject for Chromoting plugin."; |
| 396 return NULL; | 396 return NULL; |
| 397 } | 397 } |
| 398 | 398 |
| 399 void ChromotingInstance::Connect(const ClientConfig& config) { | 399 void ChromotingInstance::Connect(const ClientConfig& config) { |
| 400 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); | 400 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); |
| 401 | 401 |
| 402 jingle_glue::JingleThreadWrapper::EnsureForCurrentThread(); | 402 jingle_glue::JingleThreadWrapper::EnsureForCurrentThread(); |
| 403 | 403 |
| 404 host_connection_.reset(new protocol::ConnectionToHost( | 404 host_connection_.reset(new protocol::ConnectionToHost(true)); |
| 405 context_.network_message_loop(), true)); | |
| 406 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), | 405 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), |
| 407 view_.get(), rectangle_decoder_.get(), | 406 view_.get(), rectangle_decoder_.get(), |
| 408 base::Closure())); | 407 base::Closure())); |
| 409 | 408 |
| 410 // Construct the input pipeline | 409 // Construct the input pipeline |
| 411 mouse_input_filter_.reset( | 410 mouse_input_filter_.reset( |
| 412 new protocol::MouseInputFilter(host_connection_->input_stub())); | 411 new protocol::MouseInputFilter(host_connection_->input_stub())); |
| 413 mouse_input_filter_->set_input_size(view_->get_view_size()); | 412 mouse_input_filter_->set_input_size(view_->get_view_size()); |
| 414 input_tracker_.reset( | 413 input_tracker_.reset( |
| 415 new protocol::InputEventTracker(mouse_input_filter_.get())); | 414 new protocol::InputEventTracker(mouse_input_filter_.get())); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 } | 687 } |
| 689 g_logging_to_plugin = false; | 688 g_logging_to_plugin = false; |
| 690 } | 689 } |
| 691 | 690 |
| 692 bool ChromotingInstance::IsConnected() { | 691 bool ChromotingInstance::IsConnected() { |
| 693 return host_connection_.get() && | 692 return host_connection_.get() && |
| 694 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); | 693 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); |
| 695 } | 694 } |
| 696 | 695 |
| 697 } // namespace remoting | 696 } // namespace remoting |
| OLD | NEW |