| 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 // 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace pp { | 26 namespace pp { |
| 27 class InputEvent; | 27 class InputEvent; |
| 28 class Module; | 28 class Module; |
| 29 } // namespace pp | 29 } // namespace pp |
| 30 | 30 |
| 31 namespace remoting { | 31 namespace remoting { |
| 32 | 32 |
| 33 namespace protocol { | 33 namespace protocol { |
| 34 class ConnectionToHost; | 34 class ConnectionToHost; |
| 35 class KeyEventTracker; |
| 35 } // namespace protocol | 36 } // namespace protocol |
| 36 | 37 |
| 37 class ChromotingClient; | 38 class ChromotingClient; |
| 38 class ChromotingStats; | 39 class ChromotingStats; |
| 39 class ClientContext; | 40 class ClientContext; |
| 40 class InputHandler; | 41 class MouseInputFilter; |
| 42 class PepperInputHandler; |
| 41 class PepperView; | 43 class PepperView; |
| 42 class PepperViewProxy; | 44 class PepperViewProxy; |
| 43 class RectangleUpdateDecoder; | 45 class RectangleUpdateDecoder; |
| 44 | 46 |
| 45 struct ClientConfig; | 47 struct ClientConfig; |
| 46 | 48 |
| 47 class ChromotingInstance : public pp::InstancePrivate { | 49 class ChromotingInstance : public pp::InstancePrivate { |
| 48 public: | 50 public: |
| 49 // The mimetype for which this plugin is registered. | 51 // The mimetype for which this plugin is registered. |
| 50 static const char kMimeType[]; | 52 static const char kMimeType[]; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 122 |
| 121 // PepperViewProxy is refcounted and used to interface between chromoting | 123 // PepperViewProxy is refcounted and used to interface between chromoting |
| 122 // objects and PepperView and perform thread switching. It wraps around | 124 // objects and PepperView and perform thread switching. It wraps around |
| 123 // |view_| and receives method calls on chromoting threads. These method | 125 // |view_| and receives method calls on chromoting threads. These method |
| 124 // calls are then delegates on the pepper thread. During destruction of | 126 // calls are then delegates on the pepper thread. During destruction of |
| 125 // ChromotingInstance we need to detach PepperViewProxy from PepperView since | 127 // ChromotingInstance we need to detach PepperViewProxy from PepperView since |
| 126 // both ChromotingInstance and PepperView are destroyed and there will be | 128 // both ChromotingInstance and PepperView are destroyed and there will be |
| 127 // outstanding tasks on the pepper message loop. | 129 // outstanding tasks on the pepper message loop. |
| 128 scoped_refptr<PepperViewProxy> view_proxy_; | 130 scoped_refptr<PepperViewProxy> view_proxy_; |
| 129 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; | 131 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; |
| 130 scoped_ptr<InputHandler> input_handler_; | 132 scoped_ptr<MouseInputFilter> mouse_input_filter_; |
| 133 scoped_ptr<protocol::KeyEventTracker> key_event_tracker_; |
| 134 scoped_ptr<PepperInputHandler> input_handler_; |
| 131 scoped_ptr<ChromotingClient> client_; | 135 scoped_ptr<ChromotingClient> client_; |
| 132 | 136 |
| 133 // XmppProxy is a refcounted interface used to perform thread-switching and | 137 // XmppProxy is a refcounted interface used to perform thread-switching and |
| 134 // detaching between objects whose lifetimes are controlled by pepper, and | 138 // detaching between objects whose lifetimes are controlled by pepper, and |
| 135 // jingle_glue objects. This is used when if we start a sandboxed jingle | 139 // jingle_glue objects. This is used when if we start a sandboxed jingle |
| 136 // connection. | 140 // connection. |
| 137 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 141 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
| 138 | 142 |
| 139 // JavaScript interface to control this instance. | 143 // JavaScript interface to control this instance. |
| 140 // This wraps a ChromotingScriptableObject in a pp::Var. | 144 // This wraps a ChromotingScriptableObject in a pp::Var. |
| 141 pp::Var instance_object_; | 145 pp::Var instance_object_; |
| 142 | 146 |
| 143 scoped_ptr<ScopedThreadProxy> thread_proxy_; | 147 scoped_ptr<ScopedThreadProxy> thread_proxy_; |
| 144 | 148 |
| 145 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 149 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 146 }; | 150 }; |
| 147 | 151 |
| 148 } // namespace remoting | 152 } // namespace remoting |
| 149 | 153 |
| 150 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 154 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |