OLD | NEW |
---|---|
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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "content/browser/renderer_host/input/synthetic_gesture_new.h" | 9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
10 #include "content/common/content_export.h" | 10 |
11 #include "content/common/input/synthetic_gesture_params.h" | 11 namespace ui { |
12 struct LatencyInfo; | |
13 } | |
14 | |
15 namespace WebKit { | |
16 class WebTouchEvent; | |
17 } | |
12 | 18 |
13 namespace content { | 19 namespace content { |
14 | 20 |
15 class InputEvent; | 21 class RenderWidgetHostView; |
16 | 22 |
17 // Interface between the synthetic gesture controller and the RWHV. | 23 class SyntheticGestureTargetBase : public SyntheticGestureTarget { |
18 class CONTENT_EXPORT SyntheticGestureTarget { | |
19 public: | 24 public: |
20 virtual void QueueInputEventToPlatform(const InputEvent& event) = 0; | 25 SyntheticGestureTargetBase(RenderWidgetHostView* render_view); |
26 ~SyntheticGestureTargetBase(); | |
27 | |
28 virtual void QueueWebTouchEventToPlatform( | |
29 const WebKit::WebTouchEvent& web_touch, | |
30 const ui::LatencyInfo& latency_info); | |
31 | |
32 // SyntheticGestureTarget: | |
33 virtual void QueueInputEventToPlatform(const InputEvent& event) OVERRIDE; | |
Dominik Grewe
2013/10/25 16:10:11
I'm wondering if it's better to override this meth
kouhei (in TOK)
2013/10/28 03:03:17
I'm not sure here. I added DCHECKs for unsupported
| |
21 | 34 |
22 virtual void OnSyntheticGestureCompleted( | 35 virtual void OnSyntheticGestureCompleted( |
23 SyntheticGestureNew::Result result) = 0; | 36 SyntheticGestureNew::Result result) OVERRIDE; |
24 | 37 |
25 virtual base::TimeDelta GetSyntheticGestureUpdateRate() const = 0; | 38 virtual base::TimeDelta GetSyntheticGestureUpdateRate() const OVERRIDE; |
26 | 39 |
27 virtual SyntheticGestureParams::GestureSourceType | 40 virtual SyntheticGestureParams::GestureSourceType |
28 GetDefaultSyntheticGestureSourceType() const = 0; | 41 GetDefaultSyntheticGestureSourceType() const OVERRIDE; |
29 virtual bool SupportsSyntheticGestureSourceType( | 42 virtual bool SupportsSyntheticGestureSourceType( |
30 SyntheticGestureParams::GestureSourceType gesture_source_type) const = 0; | 43 SyntheticGestureParams::GestureSourceType gesture_source_type) const |
44 OVERRIDE; | |
45 | |
46 protected: | |
47 RenderWidgetHostView* render_view() { return render_view_; } | |
48 | |
49 private: | |
50 RenderWidgetHostView* render_view_; | |
51 | |
52 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase); | |
31 }; | 53 }; |
32 | 54 |
33 } // namespace content | 55 } // namespace content |
34 | 56 |
35 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ | 57 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |
OLD | NEW |