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

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

Issue 1884883005: Prepare SyntheticPointerAction to handle touch actions for multiple fingers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move logic to controller 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.h
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller.h b/content/browser/renderer_host/input/synthetic_gesture_controller.h
index 5a92f31edf4ff8de63ad723c3f370d5f155d33fa..edadd654c1019d5853938d29fba493bdf6f3f2b6 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller.h
@@ -14,12 +14,16 @@
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
+#include "content/browser/renderer_host/input/synthetic_pointer_action.h"
tdresser 2016/05/13 13:58:04 Where is this used?
lanwei 2016/05/19 16:04:12 Deleted.
#include "content/common/content_export.h"
+#include "content/common/input/synthetic_gesture_packet.h"
tdresser 2016/05/13 13:58:04 Where is this used?
#include "content/common/input/synthetic_gesture_params.h"
+#include "content/common/input/synthetic_pointer_action_params.h"
namespace content {
class SyntheticGestureTarget;
+using blink::WebTouchEvent;
tdresser 2016/05/13 13:58:04 Where is this used?
// Controls a synthetic gesture.
// Repeatedly invokes the gesture object's ForwardInputEvent method to send
@@ -36,6 +40,10 @@ class CONTENT_EXPORT SyntheticGestureController {
std::unique_ptr<SyntheticGesture> synthetic_gesture,
const OnGestureCompleteCallback& completion_callback);
+ void QueueSyntheticPointerAction(
+ const SyntheticPointerActionParams& gesture_params,
+ const OnGestureCompleteCallback& completion_callback);
+
// Forward input events of the currently processed gesture.
void Flush(base::TimeTicks timestamp);
@@ -43,12 +51,19 @@ class CONTENT_EXPORT SyntheticGestureController {
// fully flushed from the input pipeline (i.e., sent, processed and ack'ed).
void OnDidFlushInput();
+ void ResetSyntheticPointer();
+
+ // Only for tests in SyntheticGestureControllerTest.
+ int PointerIndex(int index) const;
tdresser 2016/05/13 13:58:04 Add this method in the test file by making instant
+
private:
void StartGesture(const SyntheticGesture& gesture);
void StopGesture(const SyntheticGesture& gesture,
const OnGestureCompleteCallback& completion_callback,
SyntheticGesture::Result result);
+ void SetSyntheticPointer(const SyntheticPointerActionParams& gesture_params);
+
std::unique_ptr<SyntheticGestureTarget> gesture_target_;
std::unique_ptr<SyntheticGesture::Result> pending_gesture_result_;
@@ -82,6 +97,10 @@ class CONTENT_EXPORT SyntheticGestureController {
std::queue<OnGestureCompleteCallback> callbacks_;
} pending_gesture_queue_;
+ std::vector<SyntheticPointerActionParams> action_param_list_;
tdresser 2016/05/13 13:58:04 We're going to be adding a bunch of state and logi
+ std::unique_ptr<SyntheticPointer> synthetic_pointer_;
+ std::vector<int> index_map_;
tdresser 2016/05/13 13:58:04 If this is fixed size, use std::array. Add a comme
lanwei 2016/05/19 16:04:12 Done.
+
DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController);
};

Powered by Google App Engine
This is Rietveld 408576698