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 // TODO(ajwong): We need to come up with a better description of the | 5 // TODO(ajwong): We need to come up with a better description of the |
6 // responsibilities for each thread. | 6 // responsibilities for each thread. |
7 | 7 |
8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 // include instance_private.h | 24 // include instance_private.h |
25 #if defined(PostMessage) | 25 #if defined(PostMessage) |
26 #undef PostMessage | 26 #undef PostMessage |
27 #endif | 27 #endif |
28 | 28 |
29 #include "ppapi/cpp/instance.h" | 29 #include "ppapi/cpp/instance.h" |
30 #include "remoting/client/client_context.h" | 30 #include "remoting/client/client_context.h" |
31 #include "remoting/client/client_user_interface.h" | 31 #include "remoting/client/client_user_interface.h" |
32 #include "remoting/client/key_event_mapper.h" | 32 #include "remoting/client/key_event_mapper.h" |
33 #include "remoting/client/plugin/mac_key_event_processor.h" | 33 #include "remoting/client/plugin/mac_key_event_processor.h" |
| 34 #include "remoting/client/plugin/pepper_input_handler.h" |
34 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" | 35 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" |
35 #include "remoting/proto/event.pb.h" | 36 #include "remoting/proto/event.pb.h" |
36 #include "remoting/protocol/clipboard_stub.h" | 37 #include "remoting/protocol/clipboard_stub.h" |
37 #include "remoting/protocol/connection_to_host.h" | 38 #include "remoting/protocol/connection_to_host.h" |
38 #include "remoting/protocol/cursor_shape_stub.h" | 39 #include "remoting/protocol/cursor_shape_stub.h" |
| 40 #include "remoting/protocol/input_event_tracker.h" |
| 41 #include "remoting/protocol/mouse_input_filter.h" |
39 | 42 |
40 namespace base { | 43 namespace base { |
41 class DictionaryValue; | 44 class DictionaryValue; |
42 } // namespace base | 45 } // namespace base |
43 | 46 |
44 namespace pp { | 47 namespace pp { |
45 class InputEvent; | 48 class InputEvent; |
46 class Module; | 49 class Module; |
47 } // namespace pp | 50 } // namespace pp |
48 | 51 |
49 namespace remoting { | 52 namespace remoting { |
50 | 53 |
51 namespace protocol { | |
52 class InputEventTracker; | |
53 class MouseInputFilter; | |
54 } // namespace protocol | |
55 | |
56 class ChromotingClient; | 54 class ChromotingClient; |
57 class ChromotingStats; | 55 class ChromotingStats; |
58 class ClientContext; | 56 class ClientContext; |
59 class FrameConsumerProxy; | 57 class FrameConsumerProxy; |
60 class PepperAudioPlayer; | 58 class PepperAudioPlayer; |
61 class PepperInputHandler; | |
62 class PepperView; | 59 class PepperView; |
63 class PepperXmppProxy; | 60 class PepperXmppProxy; |
64 class RectangleUpdateDecoder; | 61 class RectangleUpdateDecoder; |
65 | 62 |
66 struct ClientConfig; | 63 struct ClientConfig; |
67 | 64 |
68 class ChromotingInstance : | 65 class ChromotingInstance : |
69 public ClientUserInterface, | 66 public ClientUserInterface, |
70 public protocol::ClipboardStub, | 67 public protocol::ClipboardStub, |
71 public protocol::CursorShapeStub, | 68 public protocol::CursorShapeStub, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 void ProcessLogToUI(const std::string& message); | 177 void ProcessLogToUI(const std::string& message); |
181 | 178 |
182 // Returns true if there is a ConnectionToHost and it is connected. | 179 // Returns true if there is a ConnectionToHost and it is connected. |
183 bool IsConnected(); | 180 bool IsConnected(); |
184 | 181 |
185 bool initialized_; | 182 bool initialized_; |
186 | 183 |
187 PepperPluginThreadDelegate plugin_thread_delegate_; | 184 PepperPluginThreadDelegate plugin_thread_delegate_; |
188 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 185 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
189 ClientContext context_; | 186 ClientContext context_; |
190 scoped_ptr<protocol::ConnectionToHost> host_connection_; | 187 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; |
191 scoped_ptr<PepperView> view_; | 188 scoped_ptr<PepperView> view_; |
192 | 189 |
193 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; | 190 scoped_ptr<protocol::ConnectionToHost> host_connection_; |
| 191 scoped_ptr<ChromotingClient> client_; |
194 | 192 |
195 scoped_ptr<protocol::MouseInputFilter> mouse_input_filter_; | 193 // Input pipeline components, in reverse order of distance from input source. |
196 scoped_ptr<protocol::InputEventTracker> input_tracker_; | 194 protocol::MouseInputFilter mouse_input_filter_; |
| 195 protocol::InputEventTracker input_tracker_; |
197 #if defined(OS_MACOSX) | 196 #if defined(OS_MACOSX) |
198 scoped_ptr<MacKeyEventProcessor> mac_key_event_processor_; | 197 MacKeyEventProcessor mac_key_event_processor_; |
199 #endif | 198 #endif |
200 KeyEventMapper key_mapper_; | 199 KeyEventMapper key_mapper_; |
201 scoped_ptr<PepperInputHandler> input_handler_; | 200 PepperInputHandler input_handler_; |
202 scoped_ptr<ChromotingClient> client_; | |
203 | 201 |
204 // XmppProxy is a refcounted interface used to perform thread-switching and | 202 // XmppProxy is a refcounted interface used to perform thread-switching and |
205 // detaching between objects whose lifetimes are controlled by pepper, and | 203 // detaching between objects whose lifetimes are controlled by pepper, and |
206 // jingle_glue objects. This is used when if we start a sandboxed jingle | 204 // jingle_glue objects. This is used when if we start a sandboxed jingle |
207 // connection. | 205 // connection. |
208 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 206 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
209 | 207 |
210 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 208 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
211 | 209 |
212 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 210 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
213 }; | 211 }; |
214 | 212 |
215 } // namespace remoting | 213 } // namespace remoting |
216 | 214 |
217 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 215 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |