IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / renderer_host / input / synthetic_gesture_target_base.h
blobefb8d76b57ed1b734248560ec2a004f0f546f1d9
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 struct 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 virtual ~SyntheticGestureTargetBase();
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 virtual void DispatchInputEventToPlatform(const InputEvent& event) OVERRIDE;
45 virtual void OnSyntheticGestureCompleted(
46 SyntheticGesture::Result result) OVERRIDE;
48 virtual void SetNeedsFlush() OVERRIDE;
50 virtual SyntheticGestureParams::GestureSourceType
51 GetDefaultSyntheticGestureSourceType() const OVERRIDE;
52 virtual bool SupportsSyntheticGestureSourceType(
53 SyntheticGestureParams::GestureSourceType gesture_source_type) const
54 OVERRIDE;
56 virtual base::TimeDelta PointerAssumedStoppedTime() const OVERRIDE;
58 virtual int GetTouchSlopInDips() const OVERRIDE;
60 protected:
61 RenderWidgetHostImpl* render_widget_host() const { return host_; }
63 private:
64 RenderWidgetHostImpl* host_;
66 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase);
69 } // namespace content
71 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_