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 21 matching lines...) Expand all Loading... | |
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_input_handler.h" |
35 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" | 35 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" |
36 #include "remoting/proto/event.pb.h" | 36 #include "remoting/proto/event.pb.h" |
37 #include "remoting/protocol/clipboard_stub.h" | 37 #include "remoting/protocol/clipboard_stub.h" |
38 #include "remoting/protocol/connection_to_host.h" | 38 #include "remoting/protocol/connection_to_host.h" |
39 #include "remoting/protocol/cursor_shape_stub.h" | 39 #include "remoting/protocol/cursor_shape_stub.h" |
40 #include "remoting/protocol/input_event_tracker.h" | 40 #include "remoting/protocol/input_event_tracker.h" |
41 #include "remoting/protocol/mouse_input_filter.h" | 41 #include "remoting/protocol/mouse_input_filter.h" |
42 #include "remoting/protocol/negotiating_authenticator.h" | |
42 | 43 |
43 namespace base { | 44 namespace base { |
44 class DictionaryValue; | 45 class DictionaryValue; |
45 } // namespace base | 46 } // namespace base |
46 | 47 |
47 namespace pp { | 48 namespace pp { |
48 class InputEvent; | 49 class InputEvent; |
49 class Module; | 50 class Module; |
50 } // namespace pp | 51 } // namespace pp |
51 | 52 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 void Disconnect(); | 127 void Disconnect(); |
127 void OnIncomingIq(const std::string& iq); | 128 void OnIncomingIq(const std::string& iq); |
128 void ReleaseAllKeys(); | 129 void ReleaseAllKeys(); |
129 void InjectKeyEvent(const protocol::KeyEvent& event); | 130 void InjectKeyEvent(const protocol::KeyEvent& event); |
130 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); | 131 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); |
131 void TrapKey(uint32 usb_keycode, bool trap); | 132 void TrapKey(uint32 usb_keycode, bool trap); |
132 void SendClipboardItem(const std::string& mime_type, const std::string& item); | 133 void SendClipboardItem(const std::string& mime_type, const std::string& item); |
133 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi); | 134 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi); |
134 void PauseVideo(bool pause); | 135 void PauseVideo(bool pause); |
135 void PauseAudio(bool pause); | 136 void PauseAudio(bool pause); |
137 void FetchSecretFromDialog( | |
Sergey Ulanov
2013/03/20 05:49:05
this and the following method do not need to be pu
rmsousa
2013/03/20 20:17:16
Actually none of the methods in this block do - th
| |
138 const protocol::SecretFetchedCallback& secret_fetched_callback); | |
139 static void FetchSecretFromString( | |
Sergey Ulanov
2013/03/20 05:49:05
nit: static methods should be declared above non-s
rmsousa
2013/03/20 20:17:16
Done.
| |
140 const std::string& shared_secret, | |
141 const protocol::SecretFetchedCallback& secret_fetched_callback); | |
142 void OnPinFetched(const std::string& pin); | |
rmsousa
2013/03/20 04:54:54
OnPinFetched and use_async_pin_dialog_ below are s
Sergey Ulanov
2013/03/20 05:49:05
sgtm
rmsousa
2013/03/20 20:17:16
Done.
| |
136 | 143 |
137 // Return statistics record by ChromotingClient. | 144 // Return statistics record by ChromotingClient. |
138 // If no connection is currently active then NULL will be returned. | 145 // If no connection is currently active then NULL will be returned. |
139 ChromotingStats* GetStats(); | 146 ChromotingStats* GetStats(); |
140 | 147 |
141 // Registers a global log message handler that redirects the log output to | 148 // Registers a global log message handler that redirects the log output to |
142 // our plugin instance. | 149 // our plugin instance. |
143 // This is called by the plugin's PPP_InitializeModule. | 150 // This is called by the plugin's PPP_InitializeModule. |
144 // Note that no logging will be processed unless a ChromotingInstance has been | 151 // Note that no logging will be processed unless a ChromotingInstance has been |
145 // registered for logging (see RegisterLoggingInstance). | 152 // registered for logging (see RegisterLoggingInstance). |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 #endif | 210 #endif |
204 KeyEventMapper key_mapper_; | 211 KeyEventMapper key_mapper_; |
205 PepperInputHandler input_handler_; | 212 PepperInputHandler input_handler_; |
206 | 213 |
207 // XmppProxy is a refcounted interface used to perform thread-switching and | 214 // XmppProxy is a refcounted interface used to perform thread-switching and |
208 // detaching between objects whose lifetimes are controlled by pepper, and | 215 // detaching between objects whose lifetimes are controlled by pepper, and |
209 // jingle_glue objects. This is used when if we start a sandboxed jingle | 216 // jingle_glue objects. This is used when if we start a sandboxed jingle |
210 // connection. | 217 // connection. |
211 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 218 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
212 | 219 |
220 // PIN Fetcher. | |
221 bool use_async_pin_dialog_; | |
222 protocol::SecretFetchedCallback secret_fetched_callback_; | |
223 | |
213 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 224 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
214 | 225 |
215 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 226 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
216 }; | 227 }; |
217 | 228 |
218 } // namespace remoting | 229 } // namespace remoting |
219 | 230 |
220 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 231 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |