1 // Copyright 2014 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.
5 #include "base/macros.h"
6 #include "ui/events/gestures/gesture_recognizer.h"
12 // Stub implementation of GestureRecognizer for Mac. Currently only serves to
13 // provide a no-op implementation of TransferEventsTo().
14 class GestureRecognizerImplMac
: public GestureRecognizer
{
16 GestureRecognizerImplMac() {}
17 virtual ~GestureRecognizerImplMac() {}
20 virtual bool ProcessTouchEventPreDispatch(
21 const TouchEvent
& event
,
22 GestureConsumer
* consumer
) OVERRIDE
{
26 virtual Gestures
* ProcessTouchEventPostDispatch(
27 const TouchEvent
& event
,
28 ui::EventResult result
,
29 GestureConsumer
* consumer
) OVERRIDE
{
32 virtual Gestures
* ProcessTouchEventOnAsyncAck(
33 const TouchEvent
& event
,
34 ui::EventResult result
,
35 GestureConsumer
* consumer
) OVERRIDE
{
38 virtual bool CleanupStateForConsumer(GestureConsumer
* consumer
) OVERRIDE
{
41 virtual GestureConsumer
* GetTouchLockedTarget(
42 const TouchEvent
& event
) OVERRIDE
{
45 virtual GestureConsumer
* GetTargetForGestureEvent(
46 const GestureEvent
& event
) OVERRIDE
{
49 virtual GestureConsumer
* GetTargetForLocation(const gfx::PointF
& location
,
50 int source_device_id
) OVERRIDE
{
53 virtual void TransferEventsTo(GestureConsumer
* current_consumer
,
54 GestureConsumer
* new_consumer
) OVERRIDE
{}
55 virtual bool GetLastTouchPointForTarget(GestureConsumer
* consumer
,
56 gfx::PointF
* point
) OVERRIDE
{
59 virtual bool CancelActiveTouches(GestureConsumer
* consumer
) OVERRIDE
{
62 virtual void AddGestureEventHelper(GestureEventHelper
* helper
) OVERRIDE
{}
63 virtual void RemoveGestureEventHelper(GestureEventHelper
* helper
) OVERRIDE
{}
65 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac
);
71 GestureRecognizer
* GestureRecognizer::Get() {
72 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac
, instance
, ());