• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
6 #define CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
7 
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
10 #include "content/common/input/synthetic_gesture_params.h"
11 
12 namespace content {
13 
14 // Wraps an object of type SyntheticGestureParams (or one of its subclasses) for
15 // sending it over IPC.
16 class CONTENT_EXPORT SyntheticGesturePacket {
17  public:
18   SyntheticGesturePacket();
19   ~SyntheticGesturePacket();
20 
set_gesture_params(scoped_ptr<SyntheticGestureParams> gesture_params)21   void set_gesture_params(scoped_ptr<SyntheticGestureParams> gesture_params) {
22     gesture_params_ = gesture_params.Pass();
23   }
gesture_params()24   const SyntheticGestureParams* gesture_params() const {
25     return gesture_params_.get();
26   }
pass_gesture_params()27   scoped_ptr<SyntheticGestureParams> pass_gesture_params() {
28     return gesture_params_.Pass();
29   }
30 
31  private:
32   scoped_ptr<SyntheticGestureParams> gesture_params_;
33 
34   DISALLOW_COPY_AND_ASSIGN(SyntheticGesturePacket);
35 };
36 
37 }  // namespace content
38 
39 #endif  // CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
40