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, |
30 GestureConsumer* consumer) override { | 31 GestureConsumer* consumer) override { |
31 return {}; | 32 return {}; |
32 } | 33 } |
33 bool CleanupStateForConsumer(GestureConsumer* consumer) override { | 34 bool CleanupStateForConsumer(GestureConsumer* consumer) override { |
34 return false; | 35 return false; |
35 } | 36 } |
36 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override { | 37 GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override { |
37 return NULL; | 38 return NULL; |
38 } | 39 } |
39 GestureConsumer* GetTargetForLocation(const gfx::PointF& location, | 40 GestureConsumer* GetTargetForLocation(const gfx::PointF& location, |
(...skipping 17 matching lines...) Expand all Loading... |
57 | 58 |
58 } // namespace | 59 } // namespace |
59 | 60 |
60 // static | 61 // static |
61 GestureRecognizer* GestureRecognizer::Get() { | 62 GestureRecognizer* GestureRecognizer::Get() { |
62 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); | 63 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ()); |
63 return &instance; | 64 return &instance; |
64 } | 65 } |
65 | 66 |
66 } // namespace ui | 67 } // namespace ui |
OLD | NEW |