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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_controller.cc

Issue 1884883005: Prepare SyntheticPointerAction to handle touch actions for multiple fingers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make a new class SyntheticPointerActionController Created 4 years, 7 months 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/browser/renderer_host/input/synthetic_gesture_controller.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller.cc b/content/browser/renderer_host/input/synthetic_gesture_controller.cc
index 9e5bc84403eb18e01f09e43b26b9db51fbd20211..8ccc135e743d1b04122d5194e2f4ba0a50d000f9 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller.cc
@@ -16,7 +16,10 @@ namespace content {
SyntheticGestureController::SyntheticGestureController(
std::unique_ptr<SyntheticGestureTarget> gesture_target)
- : gesture_target_(std::move(gesture_target)) {}
+ : gesture_target_(std::move(gesture_target)) {
+ pointer_action_controller_.SetDefaultGestureSourceType(
+ gesture_target_->GetDefaultSyntheticGestureSourceType());
+}
SyntheticGestureController::~SyntheticGestureController() {}
@@ -34,6 +37,19 @@ void SyntheticGestureController::QueueSyntheticGesture(
StartGesture(*pending_gesture_queue_.FrontGesture());
}
+void SyntheticGestureController::QueueSyntheticPointerAction(
+ const SyntheticPointerActionParams& gesture_params,
+ const OnGestureCompleteCallback& completion_callback) {
+ std::unique_ptr<SyntheticGesture> synthetic_gesture =
+ pointer_action_controller_.CreateSyntheticPointerAction(gesture_params);
+ if (synthetic_gesture)
+ QueueSyntheticGesture(std::move(synthetic_gesture), completion_callback);
+}
+
+void SyntheticGestureController::ResetSyntheticPointer() {
+ pointer_action_controller_.ResetSyntheticPointer();
+}
+
void SyntheticGestureController::Flush(base::TimeTicks timestamp) {
TRACE_EVENT0("input", "SyntheticGestureController::Flush");
if (pending_gesture_queue_.IsEmpty())

Powered by Google App Engine
This is Rietveld 408576698