Add ICU message format support
[chromium-blink-merge.git] / content / browser / renderer_host / input / synthetic_gesture_target_base.h
blob8063ae0068369c7ef45d53ded21a895ada912cb5
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
8 #include "base/time/time.h"
9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
11 namespace ui {
12 class LatencyInfo;
15 namespace blink {
16 class WebTouchEvent;
17 class WebMouseEvent;
18 class WebMouseWheelEvent;
21 namespace content {
23 class RenderWidgetHostImpl;
25 class SyntheticGestureTargetBase : public SyntheticGestureTarget {
26 public:
27 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
28 ~SyntheticGestureTargetBase() override;
30 virtual void DispatchWebTouchEventToPlatform(
31 const blink::WebTouchEvent& web_touch,
32 const ui::LatencyInfo& latency_info);
34 virtual void DispatchWebMouseWheelEventToPlatform(
35 const blink::WebMouseWheelEvent& web_wheel,
36 const ui::LatencyInfo& latency_info);
38 virtual void DispatchWebMouseEventToPlatform(
39 const blink::WebMouseEvent& web_mouse,
40 const ui::LatencyInfo& latency_info);
42 // SyntheticGestureTarget:
43 void DispatchInputEventToPlatform(const blink::WebInputEvent& event) override;
45 void SetNeedsFlush() override;
47 SyntheticGestureParams::GestureSourceType
48 GetDefaultSyntheticGestureSourceType() const override;
50 base::TimeDelta PointerAssumedStoppedTime() const override;
52 float GetTouchSlopInDips() const override;
54 float GetMinScalingSpanInDips() const override;
56 protected:
57 RenderWidgetHostImpl* render_widget_host() const { return host_; }
59 private:
60 bool PointIsWithinContents(int x, int y) const;
62 RenderWidgetHostImpl* host_;
64 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase);
67 } // namespace content
69 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_