OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_
H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_
H_ |
| 7 |
| 8 #include "content/browser/renderer_host/input/synthetic_pointer.h" |
| 9 #include "content/browser/renderer_host/input/synthetic_pointer_action.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/common/input/synthetic_pointer_action_list_params.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 class CONTENT_EXPORT SyntheticPointerActionController { |
| 16 public: |
| 17 SyntheticPointerActionController(); |
| 18 ~SyntheticPointerActionController(); |
| 19 |
| 20 std::unique_ptr<SyntheticGesture> CreateSyntheticPointerAction( |
| 21 const SyntheticPointerActionListParams& gesture_params); |
| 22 |
| 23 void ResetSyntheticPointer(); |
| 24 |
| 25 void SetDefaultGestureSourceType( |
| 26 SyntheticGestureParams::GestureSourceType default_type); |
| 27 |
| 28 private: |
| 29 friend class TestSyntheticGestureController; |
| 30 |
| 31 void SetSyntheticPointer( |
| 32 const SyntheticPointerActionListParams& gesture_params); |
| 33 |
| 34 // A list of all the action parameters, which should be executed in the |
| 35 // same frame. |
| 36 std::unique_ptr<SyntheticPointerActionListParams> action_list_param_; |
| 37 // For one pointer action sequence, we should use the same SyntheticPointer |
| 38 // object, and keep the states for all touch points. |
| 39 std::unique_ptr<SyntheticPointer> synthetic_pointer_; |
| 40 // This is used to map the indexes of touch points between the ones that are |
| 41 // part of the arguments to PointerAction API and the real indexes kept in |
| 42 // the touch event we will dispatch to the renderer. |
| 43 SyntheticPointerAction::IndexMap index_map_; |
| 44 |
| 45 SyntheticGestureParams::GestureSourceType default_type_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerActionController); |
| 48 }; |
| 49 |
| 50 } // namespace content |
| 51 |
| 52 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLL
ER_H_ |
OLD | NEW |