Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: remoting/client/plugin/chromoting_instance.h

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
43 class RectangleUpdateDecoder; 44 class RectangleUpdateDecoder;
44 45
45 struct ClientConfig; 46 struct ClientConfig;
46 47
47 class ChromotingInstance : public pp::InstancePrivate { 48 class ChromotingInstance : public pp::InstancePrivate {
48 public: 49 public:
49 // The mimetype for which this plugin is registered. 50 // The mimetype for which this plugin is registered.
50 static const char kMimeType[]; 51 static const char kMimeType[];
51 52
52 explicit ChromotingInstance(PP_Instance instance); 53 explicit ChromotingInstance(PP_Instance instance);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 PepperPluginThreadDelegate plugin_thread_delegate_; 113 PepperPluginThreadDelegate plugin_thread_delegate_;
113 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_; 114 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_;
114 ClientContext context_; 115 ClientContext context_;
115 scoped_ptr<protocol::ConnectionToHost> host_connection_; 116 scoped_ptr<protocol::ConnectionToHost> host_connection_;
116 scoped_ptr<PepperView> view_; 117 scoped_ptr<PepperView> view_;
117 118
118 // True if scale to fit is enabled. 119 // True if scale to fit is enabled.
119 bool scale_to_fit_; 120 bool scale_to_fit_;
120 121
121 // PepperViewProxy is refcounted and used to interface between chromoting
122 // objects and PepperView and perform thread switching. It wraps around
123 // |view_| and receives method calls on chromoting threads. These method
124 // calls are then delegates on the pepper thread. During destruction of
125 // ChromotingInstance we need to detach PepperViewProxy from PepperView since
126 // both ChromotingInstance and PepperView are destroyed and there will be
127 // outstanding tasks on the pepper message loop.
128 scoped_refptr<PepperViewProxy> view_proxy_;
129 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; 122 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
130 scoped_ptr<InputHandler> input_handler_; 123 scoped_ptr<MouseInputFilter> mouse_input_filter_;
124 scoped_ptr<protocol::KeyEventTracker> key_event_tracker_;
125 scoped_ptr<PepperInputHandler> input_handler_;
131 scoped_ptr<ChromotingClient> client_; 126 scoped_ptr<ChromotingClient> client_;
132 127
133 // XmppProxy is a refcounted interface used to perform thread-switching and 128 // XmppProxy is a refcounted interface used to perform thread-switching and
134 // detaching between objects whose lifetimes are controlled by pepper, and 129 // detaching between objects whose lifetimes are controlled by pepper, and
135 // jingle_glue objects. This is used when if we start a sandboxed jingle 130 // jingle_glue objects. This is used when if we start a sandboxed jingle
136 // connection. 131 // connection.
137 scoped_refptr<PepperXmppProxy> xmpp_proxy_; 132 scoped_refptr<PepperXmppProxy> xmpp_proxy_;
138 133
139 // JavaScript interface to control this instance. 134 // JavaScript interface to control this instance.
140 // This wraps a ChromotingScriptableObject in a pp::Var. 135 // This wraps a ChromotingScriptableObject in a pp::Var.
141 pp::Var instance_object_; 136 pp::Var instance_object_;
142 137
143 scoped_ptr<ScopedThreadProxy> thread_proxy_; 138 scoped_ptr<ScopedThreadProxy> thread_proxy_;
144 139
145 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 140 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
146 }; 141 };
147 142
148 } // namespace remoting 143 } // namespace remoting
149 144
150 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 145 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698