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

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

Issue 2478423002: Rename SyntheticPointer to SyntheticPointerDriver (Closed)
Patch Set: rename Created 4 years, 1 month 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
Index: content/common/input/synthetic_pointer_action_params.h
diff --git a/content/common/input/synthetic_pointer_action_params.h b/content/common/input/synthetic_pointer_action_params.h
index 4e51f036b7352174c7fa2573d0d9b0cd090da414..d077e4cdaf30854368255497383917f64fbb40ad 100644
--- a/content/common/input/synthetic_pointer_action_params.h
+++ b/content/common/input/synthetic_pointer_action_params.h
@@ -29,7 +29,7 @@ struct CONTENT_EXPORT SyntheticPointerActionParams
PRESS,
MOVE,
RELEASE,
- PROCESS,
+ IDLE,
tdresser 2016/11/10 14:58:32 Can we add a comment here? Why did this name chang
lanwei 2016/11/10 19:45:23 Done.
FINISH,
POINTER_ACTION_TYPE_MAX = FINISH
};
@@ -49,11 +49,10 @@ struct CONTENT_EXPORT SyntheticPointerActionParams
}
void set_index(int index) {
- DCHECK(pointer_action_type_ != PointerActionType::PROCESS &&
- pointer_action_type_ != PointerActionType::FINISH);
- // For all mouse pointer actions, the index should always be 0.
- DCHECK(gesture_source_type != MOUSE_INPUT || index == 0);
- index_ = index;
+ DCHECK(pointer_action_type_ != PointerActionType::FINISH);
+ // We only set index for source types which are not mouse.
tdresser 2016/11/10 14:58:32 We shouldn't silently not do anything here. if (g
lanwei 2016/11/10 19:45:23 Done.
+ if (gesture_source_type != MOUSE_INPUT)
+ index_ = index;
}
void set_position(const gfx::PointF& position) {
@@ -65,9 +64,9 @@ struct CONTENT_EXPORT SyntheticPointerActionParams
PointerActionType pointer_action_type() const { return pointer_action_type_; }
int index() const {
- DCHECK(pointer_action_type_ != PointerActionType::PROCESS &&
- pointer_action_type_ != PointerActionType::FINISH);
- DCHECK(gesture_source_type != MOUSE_INPUT || index_ == 0);
+ DCHECK(pointer_action_type_ != PointerActionType::FINISH);
+ // For source type of mouse, the index should always be -1 and never change.
+ DCHECK(gesture_source_type != MOUSE_INPUT || index_ == -1);
return index_;
}

Powered by Google App Engine
This is Rietveld 408576698