• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4 
5 #ifndef CEF_LIBCEF_BROWSER_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_
6 #define CEF_LIBCEF_BROWSER_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_
7 
8 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
9 
10 // SyntheticGestureTarget implementation for OSR.
11 class CefSyntheticGestureTargetOSR
12     : public content::SyntheticGestureTargetBase {
13  public:
14   explicit CefSyntheticGestureTargetOSR(content::RenderWidgetHostImpl* host);
15 
16   CefSyntheticGestureTargetOSR(const CefSyntheticGestureTargetOSR&) = delete;
17   CefSyntheticGestureTargetOSR& operator=(const CefSyntheticGestureTargetOSR&) =
18       delete;
19 
20   // SyntheticGestureTargetBase:
21   void DispatchWebTouchEventToPlatform(
22       const blink::WebTouchEvent& web_touch,
23       const ui::LatencyInfo& latency_info) override;
24   void DispatchWebMouseWheelEventToPlatform(
25       const blink::WebMouseWheelEvent& web_wheel,
26       const ui::LatencyInfo& latency_info) override;
27   void DispatchWebGestureEventToPlatform(
28       const blink::WebGestureEvent& web_gesture,
29       const ui::LatencyInfo& latency_info) override;
30   void DispatchWebMouseEventToPlatform(
31       const blink::WebMouseEvent& web_mouse,
32       const ui::LatencyInfo& latency_info) override;
33 
34   // SyntheticGestureTarget:
35   content::mojom::GestureSourceType GetDefaultSyntheticGestureSourceType()
36       const override;
37   float GetTouchSlopInDips() const override;
38   float GetSpanSlopInDips() const override;
39   float GetMinScalingSpanInDips() const override;
40 };
41 
42 #endif  // CEF_LIBCEF_BROWSER_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_
43