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 12 matching lines...) Expand all Loading... |
23 #include "ppapi/cpp/completion_callback.h" | 23 #include "ppapi/cpp/completion_callback.h" |
24 #include "ppapi/cpp/input_event.h" | 24 #include "ppapi/cpp/input_event.h" |
25 #include "ppapi/cpp/rect.h" | 25 #include "ppapi/cpp/rect.h" |
26 // TODO(wez): Remove this when crbug.com/86353 is complete. | 26 // TODO(wez): Remove this when crbug.com/86353 is complete. |
27 #include "ppapi/cpp/private/var_private.h" | 27 #include "ppapi/cpp/private/var_private.h" |
28 #include "remoting/base/constants.h" | 28 #include "remoting/base/constants.h" |
29 #include "remoting/base/util.h" | 29 #include "remoting/base/util.h" |
30 #include "remoting/client/client_config.h" | 30 #include "remoting/client/client_config.h" |
31 #include "remoting/client/chromoting_client.h" | 31 #include "remoting/client/chromoting_client.h" |
32 #include "remoting/client/frame_consumer_proxy.h" | 32 #include "remoting/client/frame_consumer_proxy.h" |
33 #include "remoting/client/mouse_input_filter.h" | |
34 #include "remoting/client/plugin/chromoting_scriptable_object.h" | 33 #include "remoting/client/plugin/chromoting_scriptable_object.h" |
35 #include "remoting/client/plugin/pepper_input_handler.h" | 34 #include "remoting/client/plugin/pepper_input_handler.h" |
36 #include "remoting/client/plugin/pepper_view.h" | 35 #include "remoting/client/plugin/pepper_view.h" |
37 #include "remoting/client/plugin/pepper_xmpp_proxy.h" | 36 #include "remoting/client/plugin/pepper_xmpp_proxy.h" |
38 #include "remoting/client/rectangle_update_decoder.h" | 37 #include "remoting/client/rectangle_update_decoder.h" |
39 #include "remoting/protocol/connection_to_host.h" | 38 #include "remoting/protocol/connection_to_host.h" |
40 #include "remoting/protocol/host_stub.h" | 39 #include "remoting/protocol/host_stub.h" |
41 #include "remoting/protocol/input_event_tracker.h" | 40 #include "remoting/protocol/input_event_tracker.h" |
| 41 #include "remoting/protocol/mouse_input_filter.h" |
42 | 42 |
43 // Windows defines 'PostMessage', so we have to undef it. | 43 // Windows defines 'PostMessage', so we have to undef it. |
44 #if defined(PostMessage) | 44 #if defined(PostMessage) |
45 #undef PostMessage | 45 #undef PostMessage |
46 #endif | 46 #endif |
47 | 47 |
48 namespace remoting { | 48 namespace remoting { |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); | 380 DCHECK(plugin_message_loop_->BelongsToCurrentThread()); |
381 | 381 |
382 host_connection_.reset(new protocol::ConnectionToHost( | 382 host_connection_.reset(new protocol::ConnectionToHost( |
383 context_.network_message_loop(), this, true)); | 383 context_.network_message_loop(), this, true)); |
384 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), | 384 client_.reset(new ChromotingClient(config, &context_, host_connection_.get(), |
385 view_.get(), rectangle_decoder_.get(), | 385 view_.get(), rectangle_decoder_.get(), |
386 base::Closure())); | 386 base::Closure())); |
387 | 387 |
388 // Construct the input pipeline | 388 // Construct the input pipeline |
389 mouse_input_filter_.reset( | 389 mouse_input_filter_.reset( |
390 new MouseInputFilter(host_connection_->input_stub())); | 390 new protocol::MouseInputFilter(host_connection_->input_stub())); |
391 mouse_input_filter_->set_input_size(view_->get_view_size()); | 391 mouse_input_filter_->set_input_size(view_->get_view_size()); |
392 input_tracker_.reset( | 392 input_tracker_.reset( |
393 new protocol::InputEventTracker(mouse_input_filter_.get())); | 393 new protocol::InputEventTracker(mouse_input_filter_.get())); |
394 key_mapper_.set_input_stub(input_tracker_.get()); | 394 key_mapper_.set_input_stub(input_tracker_.get()); |
395 input_handler_.reset( | 395 input_handler_.reset( |
396 new PepperInputHandler(&key_mapper_)); | 396 new PepperInputHandler(&key_mapper_)); |
397 | 397 |
398 LOG(INFO) << "Connecting to " << config.host_jid | 398 LOG(INFO) << "Connecting to " << config.host_jid |
399 << ". Local jid: " << config.local_jid << "."; | 399 << ". Local jid: " << config.local_jid << "."; |
400 | 400 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); | 628 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); |
629 data->SetString("message", message); | 629 data->SetString("message", message); |
630 PostChromotingMessage("logDebugMessage", data.Pass()); | 630 PostChromotingMessage("logDebugMessage", data.Pass()); |
631 | 631 |
632 scriptable_object->LogDebugInfo(message); | 632 scriptable_object->LogDebugInfo(message); |
633 } | 633 } |
634 g_logging_to_plugin = false; | 634 g_logging_to_plugin = false; |
635 } | 635 } |
636 | 636 |
637 } // namespace remoting | 637 } // namespace remoting |
OLD | NEW |