Chromium Code Reviews| 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_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 SyntheticPointerActionParams& gesture_params); | |
| 22 | |
| 23 void ResetSyntheticPointer(); | |
| 24 | |
| 25 void SetDefaultGestureSourceType( | |
| 26 SyntheticGestureParams::GestureSourceType default_type); | |
| 27 | |
| 28 private: | |
| 29 friend class MockSyntheticGestureController; | |
| 30 | |
| 31 void SetSyntheticPointer(const SyntheticPointerActionParams& gesture_params); | |
| 32 // Only for tests in SyntheticGestureControllerTest. | |
| 33 int PointerIndex(int index) const; | |
| 34 // A list keeps all the action paramters, which should be executed in the | |
|
tdresser
2016/05/19 17:57:04
paramters -> parameters
"A list of all"
lanwei
2016/05/20 01:48:16
Done.
| |
| 35 // same frame. | |
| 36 std::vector<SyntheticPointerActionParams> action_param_list_; | |
| 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 | |
| 41 // users define and the real indexes kept in the touch event. | |
|
tdresser
2016/05/19 17:57:04
"users define." Let's be more specific about which
| |
| 42 SyntheticPointerAction::IndexMap index_map_; | |
| 43 | |
| 44 SyntheticGestureParams::GestureSourceType default_type_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerActionController); | |
| 47 }; | |
| 48 | |
| 49 } // namespace content | |
| 50 | |
| 51 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLL ER_H_ | |
| OLD | NEW |