OLD | NEW |
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_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 static scoped_ptr<SyntheticGesture> Create( | 34 static scoped_ptr<SyntheticGesture> Create( |
35 const SyntheticGestureParams& gesture_params); | 35 const SyntheticGestureParams& gesture_params); |
36 | 36 |
37 enum Result { | 37 enum Result { |
38 GESTURE_RUNNING, | 38 GESTURE_RUNNING, |
39 GESTURE_FINISHED, | 39 GESTURE_FINISHED, |
40 GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED, | 40 GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED, |
41 GESTURE_RESULT_MAX = GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED | 41 GESTURE_RESULT_MAX = GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED |
42 }; | 42 }; |
43 | 43 |
44 enum PointerActionType { PRESS, MOVE, RELEASE }; | 44 enum PointerActionType { PRESS, MOVE, RELEASE, DELAY }; |
45 | 45 |
46 // Update the state of the gesture and forward the appropriate events to the | 46 // Update the state of the gesture and forward the appropriate events to the |
47 // platform. This function is called repeatedly by the synthetic gesture | 47 // platform. This function is called repeatedly by the synthetic gesture |
48 // controller until it stops returning GESTURE_RUNNING. | 48 // controller until it stops returning GESTURE_RUNNING. |
49 virtual Result ForwardInputEvents( | 49 virtual Result ForwardInputEvents( |
50 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) = 0; | 50 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) = 0; |
51 | 51 |
52 protected: | 52 protected: |
53 DISALLOW_COPY_AND_ASSIGN(SyntheticGesture); | 53 DISALLOW_COPY_AND_ASSIGN(SyntheticGesture); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace content | 56 } // namespace content |
57 | 57 |
58 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ |
OLD | NEW |