Chromium Code Reviews| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 public: | 31 public: |
| 32 SyntheticGesture(); | 32 SyntheticGesture(); |
| 33 virtual ~SyntheticGesture(); | 33 virtual ~SyntheticGesture(); |
| 34 | 34 |
| 35 static std::unique_ptr<SyntheticGesture> Create( | 35 static std::unique_ptr<SyntheticGesture> Create( |
| 36 const SyntheticGestureParams& gesture_params); | 36 const SyntheticGestureParams& gesture_params); |
| 37 | 37 |
| 38 enum Result { | 38 enum Result { |
| 39 GESTURE_RUNNING, | 39 GESTURE_RUNNING, |
| 40 GESTURE_FINISHED, | 40 GESTURE_FINISHED, |
| 41 // Used when receiving SyntheticPointerAction of PROCESS or FINISH type. | |
|
tdresser
2016/05/20 14:24:30
Is this comment referring to both of the values be
lanwei
2016/05/23 16:40:50
Done.
| |
| 42 // Received when we successfully processed a group of pointer actions in a | |
| 43 // sequence. | |
| 44 POINTER_ACTION_PROCESSED, | |
| 45 // Received when we successfully finished all pointer actions in a sequence. | |
| 46 POINTER_ACTION_FINISHED, | |
| 41 GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED, | 47 GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED, |
| 42 GESTURE_RESULT_MAX = GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED | 48 GESTURE_RESULT_MAX = GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED |
| 43 }; | 49 }; |
| 44 | 50 |
| 45 // Update the state of the gesture and forward the appropriate events to the | 51 // Update the state of the gesture and forward the appropriate events to the |
| 46 // platform. This function is called repeatedly by the synthetic gesture | 52 // platform. This function is called repeatedly by the synthetic gesture |
| 47 // controller until it stops returning GESTURE_RUNNING. | 53 // controller until it stops returning GESTURE_RUNNING. |
| 48 virtual Result ForwardInputEvents( | 54 virtual Result ForwardInputEvents( |
| 49 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) = 0; | 55 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) = 0; |
| 50 | 56 |
| 51 protected: | 57 protected: |
| 52 DISALLOW_COPY_AND_ASSIGN(SyntheticGesture); | 58 DISALLOW_COPY_AND_ASSIGN(SyntheticGesture); |
| 53 }; | 59 }; |
| 54 | 60 |
| 55 } // namespace content | 61 } // namespace content |
| 56 | 62 |
| 57 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ | 63 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_ |
| OLD | NEW |