| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "ui/events/gestures/gesture_recognizer.h" | 6 #include "ui/events/gestures/gesture_recognizer.h" |
| 7 | 7 |
| 8 namespace ui { | 8 namespace ui { |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 // Stub implementation of GestureRecognizer for Mac. Currently only serves to | 12 // Stub implementation of GestureRecognizer for Mac. Currently only serves to |
| 13 // provide a no-op implementation of TransferEventsTo(). | 13 // provide a no-op implementation of TransferEventsTo(). |
| 14 class GestureRecognizerImplMac : public GestureRecognizer { | 14 class GestureRecognizerImplMac : public GestureRecognizer { |
| 15 public: | 15 public: |
| 16 GestureRecognizerImplMac() {} | 16 GestureRecognizerImplMac() {} |
| 17 ~GestureRecognizerImplMac() override {} | 17 ~GestureRecognizerImplMac() override {} |
| 18 | 18 |
| 19 private: | 19 private: |
| 20 bool ProcessTouchEventPreDispatch(const TouchEvent& event, | 20 bool ProcessTouchEventPreDispatch(TouchEvent* event, |
| 21 GestureConsumer* consumer) override { | 21 GestureConsumer* consumer) override { |
| 22 return false; | 22 return false; |
| 23 } | 23 } |
| 24 | 24 |
| 25 Gestures* ProcessTouchEventPostDispatch(const TouchEvent& event, | 25 Gestures* ProcessTouchEventPostDispatch(const TouchEvent& event, |
| 26 ui::EventResult result, | 26 ui::EventResult result, |
| 27 GestureConsumer* consumer) override { | 27 GestureConsumer* consumer) override { |
| 28 return NULL; | 28 return NULL; |
| 29 } | 29 } |
| 30 Gestures* ProcessTouchEventOnAsyncAck(const TouchEvent& event, | 30 Gestures* ProcessTouchEventOnAsyncAck(const TouchEvent& event, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 // static | 64 // static |
| 65 GestureRecognizer* GestureRecognizer::Get() { | 65 GestureRecognizer* GestureRecognizer::Get() { |
| 66 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); | 66 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); |
| 67 return &instance; | 67 return &instance; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace ui | 70 } // namespace ui |
| OLD | NEW |