Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: content/common/input/synthetic_pointer_action_params.cc

Issue 2336803003: Make SyntheticPointerAction to flush the pointer action sequence (Closed)
Patch Set: controller Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/input/synthetic_pointer_action_params.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input/synthetic_pointer_action_params.cc
diff --git a/content/common/input/synthetic_pointer_action_params.cc b/content/common/input/synthetic_pointer_action_params.cc
index 5ed7c700b90743fc7b90fc56909c203e5d2dd12e..84efe479259462cfec12641b12359aefab239f52 100644
--- a/content/common/input/synthetic_pointer_action_params.cc
+++ b/content/common/input/synthetic_pointer_action_params.cc
@@ -7,50 +7,12 @@
namespace content {
SyntheticPointerActionParams::SyntheticPointerActionParams()
- : pointer_action_type_(PointerActionType::NOT_INITIALIZED) {
- index_ = gesture_source_type != MOUSE_INPUT ? -1 : 0;
-}
+ : pointer_action_type_(PointerActionType::NOT_INITIALIZED), index_(0) {}
SyntheticPointerActionParams::SyntheticPointerActionParams(
- PointerActionType action_type,
- GestureSourceType source_type)
- : pointer_action_type_(action_type) {
- gesture_source_type = source_type;
- index_ = gesture_source_type != MOUSE_INPUT ? -1 : 0;
-}
-
-SyntheticPointerActionParams::SyntheticPointerActionParams(
- const SyntheticPointerActionParams& other)
- : SyntheticGestureParams(other),
- pointer_action_type_(other.pointer_action_type()) {
- switch (other.pointer_action_type()) {
- case PointerActionType::PRESS:
- case PointerActionType::MOVE:
- index_ = other.index();
- position_ = other.position();
- break;
- case PointerActionType::RELEASE:
- case PointerActionType::IDLE:
- case PointerActionType::NOT_INITIALIZED:
- index_ = other.index();
- break;
- case PointerActionType::FINISH:
- break;
- }
-}
+ PointerActionType action_type)
+ : pointer_action_type_(action_type), index_(0) {}
SyntheticPointerActionParams::~SyntheticPointerActionParams() {}
-SyntheticGestureParams::GestureType
-SyntheticPointerActionParams::GetGestureType() const {
- return POINTER_ACTION;
-}
-
-const SyntheticPointerActionParams* SyntheticPointerActionParams::Cast(
- const SyntheticGestureParams* gesture_params) {
- DCHECK(gesture_params);
- DCHECK_EQ(POINTER_ACTION, gesture_params->GetGestureType());
- return static_cast<const SyntheticPointerActionParams*>(gesture_params);
-}
-
-} // namespace content
+} // namespace content
« no previous file with comments | « content/common/input/synthetic_pointer_action_params.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698