MD Downloads: prevent search text from overlapping with the cancel search (X)
[chromium-blink-merge.git] / ui / events / gestures / gesture_recognizer_impl_mac.cc
blob881a8687a36827fa89f4f41f4e1339abb433b97d
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"
8 namespace ui {
10 namespace {
12 // Stub implementation of GestureRecognizer for Mac. Currently only serves to
13 // provide a no-op implementation of TransferEventsTo().
14 class GestureRecognizerImplMac : public GestureRecognizer {
15 public:
16 GestureRecognizerImplMac() {}
17 ~GestureRecognizerImplMac() override {}
19 private:
20 bool ProcessTouchEventPreDispatch(TouchEvent* event,
21 GestureConsumer* consumer) override {
22 return false;
25 Gestures* AckTouchEvent(uint32 unique_event_id,
26 ui::EventResult result,
27 GestureConsumer* consumer) override {
28 return NULL;
30 bool CleanupStateForConsumer(GestureConsumer* consumer) override {
31 return false;
33 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override {
34 return NULL;
36 GestureConsumer* GetTargetForGestureEvent(
37 const GestureEvent& event) override {
38 return NULL;
40 GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
41 int source_device_id) override {
42 return NULL;
44 void CancelActiveTouchesExcept(GestureConsumer* not_cancelled) override {}
45 void TransferEventsTo(GestureConsumer* current_consumer,
46 GestureConsumer* new_consumer) override {}
47 bool GetLastTouchPointForTarget(GestureConsumer* consumer,
48 gfx::PointF* point) override {
49 return false;
51 bool CancelActiveTouches(GestureConsumer* consumer) override { return false; }
52 void AddGestureEventHelper(GestureEventHelper* helper) override {}
53 void RemoveGestureEventHelper(GestureEventHelper* helper) override {}
55 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac);
58 } // namespace
60 // static
61 GestureRecognizer* GestureRecognizer::Get() {
62 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ());
63 return &instance;
66 } // namespace ui