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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target_base.h

Issue 2742473002: gpu benchmarking swipe for touchpad
Patch Set: Update direction in tests that use swipeElement/Page to maintain the same behavior. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
11 11
12 namespace ui { 12 namespace ui {
13 class LatencyInfo; 13 class LatencyInfo;
14 } 14 }
15 15
16 namespace blink { 16 namespace blink {
17 class WebTouchEvent; 17 class WebTouchEvent;
18 class WebMouseEvent; 18 class WebMouseEvent;
19 class WebMouseWheelEvent; 19 class WebMouseWheelEvent;
20 class WebGestureEvent;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
24 class RenderWidgetHostImpl; 25 class RenderWidgetHostImpl;
25 26
26 class SyntheticGestureTargetBase : public SyntheticGestureTarget { 27 class SyntheticGestureTargetBase : public SyntheticGestureTarget {
27 public: 28 public:
28 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); 29 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
29 ~SyntheticGestureTargetBase() override; 30 ~SyntheticGestureTargetBase() override;
30 31
31 virtual void DispatchWebTouchEventToPlatform( 32 virtual void DispatchWebTouchEventToPlatform(
32 const blink::WebTouchEvent& web_touch, 33 const blink::WebTouchEvent& web_touch,
33 const ui::LatencyInfo& latency_info); 34 const ui::LatencyInfo& latency_info);
34 35
35 virtual void DispatchWebMouseWheelEventToPlatform( 36 virtual void DispatchWebMouseWheelEventToPlatform(
36 const blink::WebMouseWheelEvent& web_wheel, 37 const blink::WebMouseWheelEvent& web_wheel,
37 const ui::LatencyInfo& latency_info); 38 const ui::LatencyInfo& latency_info);
38 39
39 virtual void DispatchWebMouseEventToPlatform( 40 virtual void DispatchWebMouseEventToPlatform(
40 const blink::WebMouseEvent& web_mouse, 41 const blink::WebMouseEvent& web_mouse,
41 const ui::LatencyInfo& latency_info); 42 const ui::LatencyInfo& latency_info);
42 43
44 virtual void DispatchTouchpadGestureFlingStartToPlatform(
45 const blink::WebGestureEvent& web_gesture,
46 const ui::LatencyInfo& latency_info);
47
43 // SyntheticGestureTarget: 48 // SyntheticGestureTarget:
44 void DispatchInputEventToPlatform(const blink::WebInputEvent& event) override; 49 void DispatchInputEventToPlatform(const blink::WebInputEvent& event) override;
45 50
46 void SetNeedsFlush() override; 51 void SetNeedsFlush() override;
47 52
48 SyntheticGestureParams::GestureSourceType 53 SyntheticGestureParams::GestureSourceType
49 GetDefaultSyntheticGestureSourceType() const override; 54 GetDefaultSyntheticGestureSourceType() const override;
50 55
51 base::TimeDelta PointerAssumedStoppedTime() const override; 56 base::TimeDelta PointerAssumedStoppedTime() const override;
52 57
53 float GetTouchSlopInDips() const override; 58 float GetTouchSlopInDips() const override;
54 59
55 float GetMinScalingSpanInDips() const override; 60 float GetMinScalingSpanInDips() const override;
56 61
57 protected: 62 protected:
58 RenderWidgetHostImpl* render_widget_host() const { return host_; } 63 RenderWidgetHostImpl* render_widget_host() const { return host_; }
59 64
60 private: 65 private:
61 bool PointIsWithinContents(int x, int y) const; 66 bool PointIsWithinContents(int x, int y) const;
62 67
63 RenderWidgetHostImpl* host_; 68 RenderWidgetHostImpl* host_;
64 69
65 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase); 70 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase);
66 }; 71 };
67 72
68 } // namespace content 73 } // namespace content
69 74
70 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ 75 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698