Index: content/browser/renderer_host/input/synthetic_pointer_action_controller.h |
diff --git a/content/browser/renderer_host/input/synthetic_pointer_action_controller.h b/content/browser/renderer_host/input/synthetic_pointer_action_controller.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0b4945866a8bdad48be40f781d1190085783a0e8 |
--- /dev/null |
+++ b/content/browser/renderer_host/input/synthetic_pointer_action_controller.h |
@@ -0,0 +1,51 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_ |
+ |
+#include "content/browser/renderer_host/input/synthetic_pointer.h" |
+#include "content/browser/renderer_host/input/synthetic_pointer_action.h" |
+#include "content/common/content_export.h" |
+#include "content/common/input/synthetic_pointer_action_params.h" |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT SyntheticPointerActionController { |
+ public: |
+ SyntheticPointerActionController(); |
+ ~SyntheticPointerActionController(); |
+ |
+ std::unique_ptr<SyntheticGesture> CreateSyntheticPointerAction( |
+ const SyntheticPointerActionParams& gesture_params); |
+ |
+ void ResetSyntheticPointer(); |
+ |
+ void SetDefaultGestureSourceType( |
+ SyntheticGestureParams::GestureSourceType default_type); |
+ |
+ private: |
+ friend class MockSyntheticGestureController; |
+ |
+ void SetSyntheticPointer(const SyntheticPointerActionParams& gesture_params); |
+ // Only for tests in SyntheticGestureControllerTest. |
+ int PointerIndex(int index) const; |
+ // 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.
|
+ // same frame. |
+ std::vector<SyntheticPointerActionParams> action_param_list_; |
+ // For one pointer action sequence, we should use the same SyntheticPointer |
+ // object, and keep the states for all touch points. |
+ std::unique_ptr<SyntheticPointer> synthetic_pointer_; |
+ // This is used to map the indexes of touch points between the ones that |
+ // 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
|
+ SyntheticPointerAction::IndexMap index_map_; |
+ |
+ SyntheticGestureParams::GestureSourceType default_type_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SyntheticPointerActionController); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_ |