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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Posts trapped keys to the web-app to handle. | 183 // Posts trapped keys to the web-app to handle. |
184 void SendTrappedKey(uint32 usb_keycode, bool pressed); | 184 void SendTrappedKey(uint32 usb_keycode, bool pressed); |
185 | 185 |
186 // Callback for PepperXmppProxy. | 186 // Callback for PepperXmppProxy. |
187 void SendOutgoingIq(const std::string& iq); | 187 void SendOutgoingIq(const std::string& iq); |
188 | 188 |
189 void SendPerfStats(); | 189 void SendPerfStats(); |
190 | 190 |
191 void ProcessLogToUI(const std::string& message); | 191 void ProcessLogToUI(const std::string& message); |
192 | 192 |
| 193 // Returns true if there is a ConnectionToHost and it is connected. |
| 194 bool IsConnected(); |
| 195 |
193 bool initialized_; | 196 bool initialized_; |
194 | 197 |
195 PepperPluginThreadDelegate plugin_thread_delegate_; | 198 PepperPluginThreadDelegate plugin_thread_delegate_; |
196 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_; | 199 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_; |
197 ClientContext context_; | 200 ClientContext context_; |
198 scoped_ptr<protocol::ConnectionToHost> host_connection_; | 201 scoped_ptr<protocol::ConnectionToHost> host_connection_; |
199 scoped_ptr<PepperView> view_; | 202 scoped_ptr<PepperView> view_; |
200 | 203 |
201 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; | 204 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; |
| 205 |
202 scoped_ptr<protocol::MouseInputFilter> mouse_input_filter_; | 206 scoped_ptr<protocol::MouseInputFilter> mouse_input_filter_; |
203 scoped_ptr<protocol::InputEventTracker> input_tracker_; | 207 scoped_ptr<protocol::InputEventTracker> input_tracker_; |
204 KeyEventMapper key_mapper_; | 208 KeyEventMapper key_mapper_; |
205 scoped_ptr<PepperInputHandler> input_handler_; | 209 scoped_ptr<PepperInputHandler> input_handler_; |
206 scoped_ptr<ChromotingClient> client_; | 210 scoped_ptr<ChromotingClient> client_; |
207 | 211 |
208 // XmppProxy is a refcounted interface used to perform thread-switching and | 212 // XmppProxy is a refcounted interface used to perform thread-switching and |
209 // detaching between objects whose lifetimes are controlled by pepper, and | 213 // detaching between objects whose lifetimes are controlled by pepper, and |
210 // jingle_glue objects. This is used when if we start a sandboxed jingle | 214 // jingle_glue objects. This is used when if we start a sandboxed jingle |
211 // connection. | 215 // connection. |
212 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 216 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
213 | 217 |
214 // JavaScript interface to control this instance. | 218 // JavaScript interface to control this instance. |
215 // This wraps a ChromotingScriptableObject in a pp::Var. | 219 // This wraps a ChromotingScriptableObject in a pp::Var. |
216 pp::Var instance_object_; | 220 pp::Var instance_object_; |
217 | 221 |
218 scoped_ptr<ScopedThreadProxy> thread_proxy_; | 222 scoped_ptr<ScopedThreadProxy> thread_proxy_; |
219 | 223 |
220 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 224 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
221 }; | 225 }; |
222 | 226 |
223 } // namespace remoting | 227 } // namespace remoting |
224 | 228 |
225 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 229 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |