| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "ui/events/event.h" |
| 8 #include "ui/events/gestures/gesture_recognizer.h" | 9 #include "ui/events/gestures/gesture_recognizer.h" |
| 9 | 10 |
| 10 namespace ui { | 11 namespace ui { |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 // Stub implementation of GestureRecognizer for Mac. Currently only serves to | 15 // Stub implementation of GestureRecognizer for Mac. Currently only serves to |
| 15 // provide a no-op implementation of TransferEventsTo(). | 16 // provide a no-op implementation of TransferEventsTo(). |
| 16 class GestureRecognizerImplMac : public GestureRecognizer { | 17 class GestureRecognizerImplMac : public GestureRecognizer { |
| 17 public: | 18 public: |
| 18 GestureRecognizerImplMac() {} | 19 GestureRecognizerImplMac() {} |
| 19 ~GestureRecognizerImplMac() override {} | 20 ~GestureRecognizerImplMac() override {} |
| 20 | 21 |
| 21 private: | 22 private: |
| 22 bool ProcessTouchEventPreDispatch(TouchEvent* event, | 23 bool ProcessTouchEventPreDispatch(TouchEvent* event, |
| 23 GestureConsumer* consumer) override { | 24 GestureConsumer* consumer) override { |
| 24 return false; | 25 return false; |
| 25 } | 26 } |
| 26 | 27 |
| 27 Gestures* AckTouchEvent(uint32_t unique_event_id, | 28 Gestures AckTouchEvent(uint32_t unique_event_id, |
| 28 ui::EventResult result, | 29 ui::EventResult result, |
| 29 GestureConsumer* consumer) override { | 30 GestureConsumer* consumer) override { |
| 30 return NULL; | 31 return {}; |
| 31 } | 32 } |
| 32 bool CleanupStateForConsumer(GestureConsumer* consumer) override { | 33 bool CleanupStateForConsumer(GestureConsumer* consumer) override { |
| 33 return false; | 34 return false; |
| 34 } | 35 } |
| 35 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override { | 36 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override { |
| 36 return NULL; | 37 return NULL; |
| 37 } | 38 } |
| 38 GestureConsumer* GetTargetForLocation(const gfx::PointF& location, | 39 GestureConsumer* GetTargetForLocation(const gfx::PointF& location, |
| 39 int source_device_id) override { | 40 int source_device_id) override { |
| 40 return NULL; | 41 return NULL; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 56 | 57 |
| 57 } // namespace | 58 } // namespace |
| 58 | 59 |
| 59 // static | 60 // static |
| 60 GestureRecognizer* GestureRecognizer::Get() { | 61 GestureRecognizer* GestureRecognizer::Get() { |
| 61 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); | 62 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); |
| 62 return &instance; | 63 return &instance; |
| 63 } | 64 } |
| 64 | 65 |
| 65 } // namespace ui | 66 } // namespace ui |
| OLD | NEW |