| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 22 matching lines...) Expand all Loading... |
| 33 #include "remoting/client/client_config.h" | 33 #include "remoting/client/client_config.h" |
| 34 #include "remoting/client/chromoting_client.h" | 34 #include "remoting/client/chromoting_client.h" |
| 35 #include "remoting/client/rectangle_update_decoder.h" | 35 #include "remoting/client/rectangle_update_decoder.h" |
| 36 #include "remoting/client/plugin/chromoting_scriptable_object.h" | 36 #include "remoting/client/plugin/chromoting_scriptable_object.h" |
| 37 #include "remoting/client/plugin/pepper_input_handler.h" | 37 #include "remoting/client/plugin/pepper_input_handler.h" |
| 38 #include "remoting/client/plugin/pepper_port_allocator_session.h" | 38 #include "remoting/client/plugin/pepper_port_allocator_session.h" |
| 39 #include "remoting/client/plugin/pepper_view.h" | 39 #include "remoting/client/plugin/pepper_view.h" |
| 40 #include "remoting/client/plugin/pepper_view_proxy.h" | 40 #include "remoting/client/plugin/pepper_view_proxy.h" |
| 41 #include "remoting/client/plugin/pepper_util.h" | 41 #include "remoting/client/plugin/pepper_util.h" |
| 42 #include "remoting/client/plugin/pepper_xmpp_proxy.h" | 42 #include "remoting/client/plugin/pepper_xmpp_proxy.h" |
| 43 #include "remoting/jingle_glue/jingle_thread.h" | |
| 44 #include "remoting/proto/auth.pb.h" | 43 #include "remoting/proto/auth.pb.h" |
| 45 #include "remoting/protocol/connection_to_host.h" | 44 #include "remoting/protocol/connection_to_host.h" |
| 46 #include "remoting/protocol/host_stub.h" | 45 #include "remoting/protocol/host_stub.h" |
| 47 // TODO(sergeyu): This is a hack: plugin should not depend on webkit | 46 // TODO(sergeyu): This is a hack: plugin should not depend on webkit |
| 48 // glue. It is used here to get P2PPacketDispatcher corresponding to | 47 // glue. It is used here to get P2PPacketDispatcher corresponding to |
| 49 // the current RenderView. Use P2P Pepper API for connection and | 48 // the current RenderView. Use P2P Pepper API for connection and |
| 50 // remove these includes. | 49 // remove these includes. |
| 51 // crbug.com/74951 | 50 // crbug.com/74951 |
| 52 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 51 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 53 #include "webkit/plugins/ppapi/resource_tracker.h" | 52 #include "webkit/plugins/ppapi/resource_tracker.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), | 201 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), |
| 203 view_proxy_, rectangle_decoder_.get(), | 202 view_proxy_, rectangle_decoder_.get(), |
| 204 input_handler_.get(), NULL)); | 203 input_handler_.get(), NULL)); |
| 205 | 204 |
| 206 LOG(INFO) << "Connecting."; | 205 LOG(INFO) << "Connecting."; |
| 207 | 206 |
| 208 // Setup the XMPP Proxy. | 207 // Setup the XMPP Proxy. |
| 209 ChromotingScriptableObject* scriptable_object = GetScriptableObject(); | 208 ChromotingScriptableObject* scriptable_object = GetScriptableObject(); |
| 210 scoped_refptr<PepperXmppProxy> xmpp_proxy = | 209 scoped_refptr<PepperXmppProxy> xmpp_proxy = |
| 211 new PepperXmppProxy(scriptable_object->AsWeakPtr(), | 210 new PepperXmppProxy(scriptable_object->AsWeakPtr(), |
| 212 context_.jingle_thread()->message_loop()); | 211 context_.network_message_loop()); |
| 213 scriptable_object->AttachXmppProxy(xmpp_proxy); | 212 scriptable_object->AttachXmppProxy(xmpp_proxy); |
| 214 | 213 |
| 215 // Kick off the connection. | 214 // Kick off the connection. |
| 216 client_->Start(xmpp_proxy); | 215 client_->Start(xmpp_proxy); |
| 217 | 216 |
| 218 LOG(INFO) << "Connection status: Initializing"; | 217 LOG(INFO) << "Connection status: Initializing"; |
| 219 GetScriptableObject()->SetConnectionInfo(STATUS_INITIALIZING, | 218 GetScriptableObject()->SetConnectionInfo(STATUS_INITIALIZING, |
| 220 QUALITY_UNKNOWN); | 219 QUALITY_UNKNOWN); |
| 221 } | 220 } |
| 222 | 221 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 489 |
| 491 initial_policy_received_ = true; | 490 initial_policy_received_ = true; |
| 492 enable_client_nat_traversal_ = traversal_policy; | 491 enable_client_nat_traversal_ = traversal_policy; |
| 493 | 492 |
| 494 if (delayed_connect_.get()) { | 493 if (delayed_connect_.get()) { |
| 495 RunTaskOnPluginThread(delayed_connect_.release()); | 494 RunTaskOnPluginThread(delayed_connect_.release()); |
| 496 } | 495 } |
| 497 } | 496 } |
| 498 | 497 |
| 499 } // namespace remoting | 498 } // namespace remoting |
| OLD | NEW |