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

Side by Side Diff: content/common/input/synthetic_gesture_packet.h

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_ 5 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
6 #define CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_ 6 #define CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
7 7
8 #include <utility>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
11 #include "content/common/input/synthetic_gesture_params.h" 13 #include "content/common/input/synthetic_gesture_params.h"
12 14
13 namespace content { 15 namespace content {
14 16
15 // Wraps an object of type SyntheticGestureParams (or one of its subclasses) for 17 // Wraps an object of type SyntheticGestureParams (or one of its subclasses) for
16 // sending it over IPC. 18 // sending it over IPC.
17 class CONTENT_EXPORT SyntheticGesturePacket { 19 class CONTENT_EXPORT SyntheticGesturePacket {
18 public: 20 public:
19 SyntheticGesturePacket(); 21 SyntheticGesturePacket();
20 ~SyntheticGesturePacket(); 22 ~SyntheticGesturePacket();
21 23
22 void set_gesture_params(scoped_ptr<SyntheticGestureParams> gesture_params) { 24 void set_gesture_params(scoped_ptr<SyntheticGestureParams> gesture_params) {
23 gesture_params_ = gesture_params.Pass(); 25 gesture_params_ = std::move(gesture_params);
24 } 26 }
25 const SyntheticGestureParams* gesture_params() const { 27 const SyntheticGestureParams* gesture_params() const {
26 return gesture_params_.get(); 28 return gesture_params_.get();
27 } 29 }
28 scoped_ptr<SyntheticGestureParams> pass_gesture_params() { 30 scoped_ptr<SyntheticGestureParams> pass_gesture_params() {
29 return gesture_params_.Pass(); 31 return std::move(gesture_params_);
30 } 32 }
31 33
32 private: 34 private:
33 scoped_ptr<SyntheticGestureParams> gesture_params_; 35 scoped_ptr<SyntheticGestureParams> gesture_params_;
34 36
35 DISALLOW_COPY_AND_ASSIGN(SyntheticGesturePacket); 37 DISALLOW_COPY_AND_ASSIGN(SyntheticGesturePacket);
36 }; 38 };
37 39
38 } // namespace content 40 } // namespace content
39 41
40 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_ 42 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
OLDNEW
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698