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

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

Issue 26664002: SyntheticGestureTarget implementation for injecting synthetic input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compiles_on_aura Created 7 years, 1 month 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
(Empty)
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.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
7
8 #include "base/time/time.h"
9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
10
11 namespace ui {
12 struct LatencyInfo;
13 }
14
15 namespace WebKit {
16 class WebTouchEvent;
17 class WebMouseEvent;
18 class WebMouseWheelEvent;
19 }
20
21 namespace content {
22
23 class RenderWidgetHostImpl;
24
25 class SyntheticGestureTargetBase : public SyntheticGestureTarget {
26 public:
27 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
28 ~SyntheticGestureTargetBase();
29
30 virtual void QueueWebTouchEventToPlatform(
31 const WebKit::WebTouchEvent& web_touch,
32 const ui::LatencyInfo& latency_info);
33
34 virtual void QueueWebMouseWheelEventToPlatform(
35 const WebKit::WebMouseWheelEvent& web_wheel,
36 const ui::LatencyInfo& latency_info);
37
38 virtual void QueueWebMouseEventToPlatform(
39 const WebKit::WebMouseEvent& web_mouse,
40 const ui::LatencyInfo& latency_info);
41
42 // SyntheticGestureTarget:
43 virtual void QueueInputEventToPlatform(const InputEvent& event) OVERRIDE;
44
45 virtual void OnSyntheticGestureCompleted(
46 SyntheticGestureNew::Result result) OVERRIDE;
47
48 virtual base::TimeDelta GetSyntheticGestureUpdateRate() const OVERRIDE;
49
50 virtual SyntheticGestureParams::GestureSourceType
51 GetDefaultSyntheticGestureSourceType() const OVERRIDE;
sadrul 2013/11/04 19:26:42 Please document these methods in the interface.
Dominik Grewe 2013/11/05 10:32:48 Is it okay if we did this in a follow-up CL? We'll
sadrul 2013/11/05 17:53:25 Sure.
52 virtual bool SupportsSyntheticGestureSourceType(
53 SyntheticGestureParams::GestureSourceType gesture_source_type) const
54 OVERRIDE;
55
56 protected:
57 RenderWidgetHostImpl* render_widget_host() { return host_; }
58
59 private:
60 RenderWidgetHostImpl* host_;
61
62 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase);
63 };
64
65 } // namespace content
66
67 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698