| Index: content/browser/renderer_host/input/synthetic_touch_driver.h
|
| diff --git a/content/browser/renderer_host/input/synthetic_touch_pointer.h b/content/browser/renderer_host/input/synthetic_touch_driver.h
|
| similarity index 58%
|
| rename from content/browser/renderer_host/input/synthetic_touch_pointer.h
|
| rename to content/browser/renderer_host/input/synthetic_touch_driver.h
|
| index 728ec4c853d2edfec28af7ef8803c5d15d7d9df9..538c4b87e470f93dea05a013d8b0e1d11c9eff5b 100644
|
| --- a/content/browser/renderer_host/input/synthetic_touch_pointer.h
|
| +++ b/content/browser/renderer_host/input/synthetic_touch_driver.h
|
| @@ -2,26 +2,30 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCH_POINTER_H_
|
| -#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCH_POINTER_H_
|
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCH_DRIVER_H_
|
| +#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCH_DRIVER_H_
|
|
|
| +#include <array>
|
| #include "base/macros.h"
|
| -#include "content/browser/renderer_host/input/synthetic_pointer.h"
|
| +#include "content/browser/renderer_host/input/synthetic_pointer_driver.h"
|
| #include "content/common/content_export.h"
|
| #include "content/common/input/synthetic_web_input_event_builders.h"
|
|
|
| namespace content {
|
|
|
| -class CONTENT_EXPORT SyntheticTouchPointer : public SyntheticPointer {
|
| +class CONTENT_EXPORT SyntheticTouchDriver : public SyntheticPointerDriver {
|
| public:
|
| - SyntheticTouchPointer();
|
| - explicit SyntheticTouchPointer(SyntheticWebTouchEvent touch_event);
|
| - ~SyntheticTouchPointer() override;
|
| + using IndexMap = std::array<int, blink::WebTouchEvent::kTouchesLengthCap>;
|
| +
|
| + SyntheticTouchDriver();
|
| + explicit SyntheticTouchDriver(SyntheticWebTouchEvent touch_event);
|
| + ~SyntheticTouchDriver() override;
|
|
|
| void DispatchEvent(SyntheticGestureTarget* target,
|
| const base::TimeTicks& timestamp) override;
|
|
|
| - int Press(float x,
|
| + int Press(int index,
|
| + float x,
|
| float y,
|
| SyntheticGestureTarget* target,
|
| const base::TimeTicks& timestamp) override;
|
| @@ -36,12 +40,15 @@ class CONTENT_EXPORT SyntheticTouchPointer : public SyntheticPointer {
|
|
|
| SyntheticGestureParams::GestureSourceType SourceType() const override;
|
|
|
| + int GetPointIndex(int index) const override;
|
| +
|
| private:
|
| SyntheticWebTouchEvent touch_event_;
|
| + IndexMap index_map_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(SyntheticTouchPointer);
|
| + DISALLOW_COPY_AND_ASSIGN(SyntheticTouchDriver);
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_COMMON_INPUT_SYNTHETIC_TOUCH_POINTER_H_
|
| +#endif // CONTENT_COMMON_INPUT_SYNTHETIC_TOUCH_DRIVER_H_
|
|
|