Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| diff --git a/content/browser/renderer_host/input/synthetic_gesture_target.h b/content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| similarity index 50% |
| copy from content/browser/renderer_host/input/synthetic_gesture_target.h |
| copy to content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| index 59ca6c1d57c9f2cfbf3e506919fe229e4526b5b2..c658eff11e8c098c2fc2a9d7a9cdfb092478b5f5 100644 |
| --- a/content/browser/renderer_host/input/synthetic_gesture_target.h |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| @@ -2,34 +2,56 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ |
| -#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ |
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |
| +#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |
| #include "base/time/time.h" |
| -#include "content/browser/renderer_host/input/synthetic_gesture_new.h" |
| -#include "content/common/content_export.h" |
| -#include "content/common/input/synthetic_gesture_params.h" |
| +#include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| + |
| +namespace ui { |
| +struct LatencyInfo; |
| +} |
| + |
| +namespace WebKit { |
| +class WebTouchEvent; |
| +} |
| namespace content { |
| -class InputEvent; |
| +class RenderWidgetHostView; |
| -// Interface between the synthetic gesture controller and the RWHV. |
| -class CONTENT_EXPORT SyntheticGestureTarget { |
| +class SyntheticGestureTargetBase : public SyntheticGestureTarget { |
| public: |
| - virtual void QueueInputEventToPlatform(const InputEvent& event) = 0; |
| + SyntheticGestureTargetBase(RenderWidgetHostView* render_view); |
| + ~SyntheticGestureTargetBase(); |
| + |
| + virtual void QueueWebTouchEventToPlatform( |
| + const WebKit::WebTouchEvent& web_touch, |
| + const ui::LatencyInfo& latency_info); |
| + |
| + // SyntheticGestureTarget: |
| + 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
|
| virtual void OnSyntheticGestureCompleted( |
| - SyntheticGestureNew::Result result) = 0; |
| + SyntheticGestureNew::Result result) OVERRIDE; |
| - virtual base::TimeDelta GetSyntheticGestureUpdateRate() const = 0; |
| + virtual base::TimeDelta GetSyntheticGestureUpdateRate() const OVERRIDE; |
| virtual SyntheticGestureParams::GestureSourceType |
| - GetDefaultSyntheticGestureSourceType() const = 0; |
| + GetDefaultSyntheticGestureSourceType() const OVERRIDE; |
| virtual bool SupportsSyntheticGestureSourceType( |
| - SyntheticGestureParams::GestureSourceType gesture_source_type) const = 0; |
| + SyntheticGestureParams::GestureSourceType gesture_source_type) const |
| + OVERRIDE; |
| + |
| + protected: |
| + RenderWidgetHostView* render_view() { return render_view_; } |
| + |
| + private: |
| + RenderWidgetHostView* render_view_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase); |
| }; |
| } // namespace content |
| -#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |