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

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

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
Index: content/browser/renderer_host/input/synthetic_touch_driver.h
diff --git a/content/browser/renderer_host/input/synthetic_touch_driver.h b/content/browser/renderer_host/input/synthetic_touch_driver.h
index 5db84cf1b69a6b05d45f115970e854d35389ec6a..872c12162713443f72588c9010e2f670a8f40fa5 100644
--- a/content/browser/renderer_host/input/synthetic_touch_driver.h
+++ b/content/browser/renderer_host/input/synthetic_touch_driver.h
@@ -11,10 +11,14 @@
#include "content/common/content_export.h"
#include "content/common/input/synthetic_web_input_event_builders.h"
+using blink::WebTouchEvent;
+
namespace content {
class CONTENT_EXPORT SyntheticTouchDriver : public SyntheticPointerDriver {
public:
+ using IndexMap = std::array<int, WebTouchEvent::kTouchesLengthCap>;
Navid Zolghadr 2016/12/06 17:05:38 Can we make this a private definition?
lanwei 2016/12/07 19:04:27 Done.
+
SyntheticTouchDriver();
explicit SyntheticTouchDriver(SyntheticWebTouchEvent touch_event);
~SyntheticTouchDriver() override;
@@ -22,7 +26,7 @@ class CONTENT_EXPORT SyntheticTouchDriver : public SyntheticPointerDriver {
void DispatchEvent(SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) override;
- int Press(float x, float y) override;
+ void Press(float x, float y, int index) override;
void Move(float x, float y, int index) override;
void Release(int index) override;
@@ -31,6 +35,8 @@ class CONTENT_EXPORT SyntheticTouchDriver : public SyntheticPointerDriver {
private:
SyntheticWebTouchEvent touch_event_;
+ IndexMap index_map_;
+
DISALLOW_COPY_AND_ASSIGN(SyntheticTouchDriver);
};

Powered by Google App Engine
This is Rietveld 408576698