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