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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 months 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
OLDNEW
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 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <string> 12 #include <string>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/thread_task_runner_handle.h" 16 #include "base/thread_task_runner_handle.h"
17 #include "ppapi/c/pp_instance.h" 17 #include "ppapi/c/pp_instance.h"
18 #include "ppapi/c/pp_rect.h" 18 #include "ppapi/c/pp_rect.h"
19 #include "ppapi/c/pp_resource.h" 19 #include "ppapi/c/pp_resource.h"
20 #include "ppapi/cpp/instance.h" 20 #include "ppapi/cpp/instance.h"
21 #include "ppapi/cpp/text_input_controller.h" 21 #include "ppapi/cpp/text_input_controller.h"
22 #include "ppapi/cpp/var.h" 22 #include "ppapi/cpp/var.h"
23 #include "remoting/client/client_context.h" 23 #include "remoting/client/client_context.h"
24 #include "remoting/client/client_user_interface.h" 24 #include "remoting/client/client_user_interface.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void PostChromotingMessage(const std::string& method, 215 void PostChromotingMessage(const std::string& method,
216 const pp::VarDictionary& data); 216 const pp::VarDictionary& data);
217 217
218 // Same as above, but serializes messages to JSON before sending them. This 218 // Same as above, but serializes messages to JSON before sending them. This
219 // method is used for backward compatibility with older version of the webapp 219 // method is used for backward compatibility with older version of the webapp
220 // that expect to received most messages formatted using JSON. 220 // that expect to received most messages formatted using JSON.
221 // 221 //
222 // TODO(sergeyu): When all current versions of the webapp support raw messages 222 // TODO(sergeyu): When all current versions of the webapp support raw messages
223 // remove this method and use PostChromotingMessage() instead. 223 // remove this method and use PostChromotingMessage() instead.
224 void PostLegacyJsonMessage(const std::string& method, 224 void PostLegacyJsonMessage(const std::string& method,
225 scoped_ptr<base::DictionaryValue> data); 225 std::unique_ptr<base::DictionaryValue> data);
226 226
227 // Posts trapped keys to the web-app to handle. 227 // Posts trapped keys to the web-app to handle.
228 void SendTrappedKey(uint32_t usb_keycode, bool pressed); 228 void SendTrappedKey(uint32_t usb_keycode, bool pressed);
229 229
230 // Callback for DelegatingSignalStrategy. 230 // Callback for DelegatingSignalStrategy.
231 void SendOutgoingIq(const std::string& iq); 231 void SendOutgoingIq(const std::string& iq);
232 232
233 void UpdatePerfStatsInUI(); 233 void UpdatePerfStatsInUI();
234 234
235 // Returns true if there is a ConnectionToHost and it is connected. 235 // Returns true if there is a ConnectionToHost and it is connected.
236 bool IsConnected(); 236 bool IsConnected();
237 237
238 // Used as the |FetchSecretCallback| for Me2Me connections. 238 // Used as the |FetchSecretCallback| for Me2Me connections.
239 // Uses the PIN request dialog in the webapp to obtain the shared secret. 239 // Uses the PIN request dialog in the webapp to obtain the shared secret.
240 void FetchSecretFromDialog( 240 void FetchSecretFromDialog(
241 bool pairing_supported, 241 bool pairing_supported,
242 const protocol::SecretFetchedCallback& secret_fetched_callback); 242 const protocol::SecretFetchedCallback& secret_fetched_callback);
243 243
244 bool initialized_; 244 bool initialized_;
245 245
246 scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner_; 246 scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner_;
247 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; 247 std::unique_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_;
248 scoped_ptr<jingle_glue::JingleThreadWrapper> thread_wrapper_; 248 std::unique_ptr<jingle_glue::JingleThreadWrapper> thread_wrapper_;
249 ClientContext context_; 249 ClientContext context_;
250 protocol::PerformanceTracker perf_tracker_; 250 protocol::PerformanceTracker perf_tracker_;
251 scoped_ptr<PepperVideoRenderer> video_renderer_; 251 std::unique_ptr<PepperVideoRenderer> video_renderer_;
252 pp::View plugin_view_; 252 pp::View plugin_view_;
253 253
254 // Contains the most-recently-reported desktop shape, if any. 254 // Contains the most-recently-reported desktop shape, if any.
255 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; 255 std::unique_ptr<webrtc::DesktopRegion> desktop_shape_;
256 256
257 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; 257 std::unique_ptr<DelegatingSignalStrategy> signal_strategy_;
258 258
259 scoped_ptr<ChromotingClient> client_; 259 std::unique_ptr<ChromotingClient> client_;
260 260
261 // Input pipeline components, in reverse order of distance from input source. 261 // Input pipeline components, in reverse order of distance from input source.
262 protocol::MouseInputFilter mouse_input_filter_; 262 protocol::MouseInputFilter mouse_input_filter_;
263 TouchInputScaler touch_input_scaler_; 263 TouchInputScaler touch_input_scaler_;
264 KeyEventMapper key_mapper_; 264 KeyEventMapper key_mapper_;
265 scoped_ptr<protocol::InputFilter> normalizing_input_filter_; 265 std::unique_ptr<protocol::InputFilter> normalizing_input_filter_;
266 protocol::InputEventTracker input_tracker_; 266 protocol::InputEventTracker input_tracker_;
267 PepperInputHandler input_handler_; 267 PepperInputHandler input_handler_;
268 268
269 // Cursor shape handling components, in reverse order to that in which they 269 // Cursor shape handling components, in reverse order to that in which they
270 // process cursor shape events. Note that |mouse_locker_| appears in the 270 // process cursor shape events. Note that |mouse_locker_| appears in the
271 // cursor pipeline since it is triggered by receipt of an empty cursor. 271 // cursor pipeline since it is triggered by receipt of an empty cursor.
272 PepperCursorSetter cursor_setter_; 272 PepperCursorSetter cursor_setter_;
273 scoped_ptr<PepperMouseLocker> mouse_locker_; 273 std::unique_ptr<PepperMouseLocker> mouse_locker_;
274 EmptyCursorFilter empty_cursor_filter_; 274 EmptyCursorFilter empty_cursor_filter_;
275 275
276 // Used to control text input settings, such as whether to show the IME. 276 // Used to control text input settings, such as whether to show the IME.
277 pp::TextInputController text_input_controller_; 277 pp::TextInputController text_input_controller_;
278 278
279 // PIN Fetcher. 279 // PIN Fetcher.
280 bool use_async_pin_dialog_; 280 bool use_async_pin_dialog_;
281 protocol::SecretFetchedCallback secret_fetched_callback_; 281 protocol::SecretFetchedCallback secret_fetched_callback_;
282 282
283 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; 283 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_;
284 284
285 base::RepeatingTimer stats_update_timer_; 285 base::RepeatingTimer stats_update_timer_;
286 286
287 base::TimeTicks connection_started_time; 287 base::TimeTicks connection_started_time;
288 base::TimeTicks connection_authenticated_time_; 288 base::TimeTicks connection_authenticated_time_;
289 base::TimeTicks connection_connected_time_; 289 base::TimeTicks connection_connected_time_;
290 290
291 // Weak reference to this instance, used for global logging and task posting. 291 // Weak reference to this instance, used for global logging and task posting.
292 base::WeakPtrFactory<ChromotingInstance> weak_factory_; 292 base::WeakPtrFactory<ChromotingInstance> weak_factory_;
293 293
294 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 294 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
295 }; 295 };
296 296
297 } // namespace remoting 297 } // namespace remoting
298 298
299 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 299 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « remoting/client/normalizing_input_filter_mac_unittest.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698