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 |
52 namespace remoting { | 53 namespace remoting { |
53 | 54 |
54 class ChromotingClient; | 55 class ChromotingClient; |
55 class ChromotingStats; | 56 class ChromotingStats; |
56 class ClientContext; | 57 class ClientContext; |
57 class FrameConsumerProxy; | 58 class FrameConsumerProxy; |
58 class PepperAudioPlayer; | 59 class PepperAudioPlayer; |
| 60 class PepperPinFetcher; |
59 class PepperView; | 61 class PepperView; |
60 class PepperXmppProxy; | 62 class PepperXmppProxy; |
61 class RectangleUpdateDecoder; | 63 class RectangleUpdateDecoder; |
62 | 64 |
63 struct ClientConfig; | 65 struct ClientConfig; |
64 | 66 |
65 class ChromotingInstance : | 67 class ChromotingInstance : |
66 public ClientUserInterface, | 68 public ClientUserInterface, |
67 public protocol::ClipboardStub, | 69 public protocol::ClipboardStub, |
68 public protocol::CursorShapeStub, | 70 public protocol::CursorShapeStub, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void Disconnect(); | 128 void Disconnect(); |
127 void OnIncomingIq(const std::string& iq); | 129 void OnIncomingIq(const std::string& iq); |
128 void ReleaseAllKeys(); | 130 void ReleaseAllKeys(); |
129 void InjectKeyEvent(const protocol::KeyEvent& event); | 131 void InjectKeyEvent(const protocol::KeyEvent& event); |
130 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); | 132 void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); |
131 void TrapKey(uint32 usb_keycode, bool trap); | 133 void TrapKey(uint32 usb_keycode, bool trap); |
132 void SendClipboardItem(const std::string& mime_type, const std::string& item); | 134 void SendClipboardItem(const std::string& mime_type, const std::string& item); |
133 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi); | 135 void NotifyClientResolution(int width, int height, int x_dpi, int y_dpi); |
134 void PauseVideo(bool pause); | 136 void PauseVideo(bool pause); |
135 void PauseAudio(bool pause); | 137 void PauseAudio(bool pause); |
| 138 void FetchPinFromDialog( |
| 139 const protocol::PinFetchedCallback& pin_fetched_callback); |
| 140 static void FetchPinFromString( |
| 141 const std::string& shared_secret, |
| 142 const protocol::PinFetchedCallback& pin_fetched_callback); |
| 143 void OnPinFetched(const std::string& shared_secret); |
136 | 144 |
137 // Return statistics record by ChromotingClient. | 145 // Return statistics record by ChromotingClient. |
138 // If no connection is currently active then NULL will be returned. | 146 // If no connection is currently active then NULL will be returned. |
139 ChromotingStats* GetStats(); | 147 ChromotingStats* GetStats(); |
140 | 148 |
141 // Registers a global log message handler that redirects the log output to | 149 // Registers a global log message handler that redirects the log output to |
142 // our plugin instance. | 150 // our plugin instance. |
143 // This is called by the plugin's PPP_InitializeModule. | 151 // This is called by the plugin's PPP_InitializeModule. |
144 // Note that no logging will be processed unless a ChromotingInstance has been | 152 // Note that no logging will be processed unless a ChromotingInstance has been |
145 // registered for logging (see RegisterLoggingInstance). | 153 // registered for logging (see RegisterLoggingInstance). |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 #endif | 211 #endif |
204 KeyEventMapper key_mapper_; | 212 KeyEventMapper key_mapper_; |
205 PepperInputHandler input_handler_; | 213 PepperInputHandler input_handler_; |
206 | 214 |
207 // XmppProxy is a refcounted interface used to perform thread-switching and | 215 // XmppProxy is a refcounted interface used to perform thread-switching and |
208 // detaching between objects whose lifetimes are controlled by pepper, and | 216 // detaching between objects whose lifetimes are controlled by pepper, and |
209 // jingle_glue objects. This is used when if we start a sandboxed jingle | 217 // jingle_glue objects. This is used when if we start a sandboxed jingle |
210 // connection. | 218 // connection. |
211 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 219 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
212 | 220 |
| 221 // PIN Fetcher. |
| 222 bool use_async_pin_dialog_; |
| 223 protocol::PinFetchedCallback pin_fetched_callback_; |
| 224 |
213 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 225 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
214 | 226 |
215 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 227 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
216 }; | 228 }; |
217 | 229 |
218 } // namespace remoting | 230 } // namespace remoting |
219 | 231 |
220 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 232 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |