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_base.h b/content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e0c66bafeec379a3e82c7e58d0e1bd9814341863 |
| --- /dev/null |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.h |
| @@ -0,0 +1,67 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// 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_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_target.h" |
| + |
| +namespace ui { |
| +struct LatencyInfo; |
| +} |
| + |
| +namespace WebKit { |
| +class WebTouchEvent; |
| +class WebMouseEvent; |
| +class WebMouseWheelEvent; |
| +} |
| + |
| +namespace content { |
| + |
| +class RenderWidgetHostImpl; |
| + |
| +class SyntheticGestureTargetBase : public SyntheticGestureTarget { |
| + public: |
| + explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); |
| + ~SyntheticGestureTargetBase(); |
| + |
| + virtual void QueueWebTouchEventToPlatform( |
| + const WebKit::WebTouchEvent& web_touch, |
| + const ui::LatencyInfo& latency_info); |
| + |
| + virtual void QueueWebMouseWheelEventToPlatform( |
| + const WebKit::WebMouseWheelEvent& web_wheel, |
| + const ui::LatencyInfo& latency_info); |
| + |
| + virtual void QueueWebMouseEventToPlatform( |
| + const WebKit::WebMouseEvent& web_mouse, |
| + const ui::LatencyInfo& latency_info); |
| + |
| + // SyntheticGestureTarget: |
| + virtual void QueueInputEventToPlatform(const InputEvent& event) OVERRIDE; |
| + |
| + virtual void OnSyntheticGestureCompleted( |
| + SyntheticGestureNew::Result result) OVERRIDE; |
| + |
| + virtual base::TimeDelta GetSyntheticGestureUpdateRate() const OVERRIDE; |
| + |
| + virtual SyntheticGestureParams::GestureSourceType |
| + 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.
|
| + virtual bool SupportsSyntheticGestureSourceType( |
| + SyntheticGestureParams::GestureSourceType gesture_source_type) const |
| + OVERRIDE; |
| + |
| + protected: |
| + RenderWidgetHostImpl* render_widget_host() { return host_; } |
| + |
| + private: |
| + RenderWidgetHostImpl* host_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetBase); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_ |