| 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 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ |
| 6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 GestureProviderAura(GestureConsumer* consumer, | 36 GestureProviderAura(GestureConsumer* consumer, |
| 37 GestureProviderAuraClient* client); | 37 GestureProviderAuraClient* client); |
| 38 ~GestureProviderAura() override; | 38 ~GestureProviderAura() override; |
| 39 | 39 |
| 40 void set_gesture_consumer(GestureConsumer* consumer) { | 40 void set_gesture_consumer(GestureConsumer* consumer) { |
| 41 gesture_consumer_ = consumer; | 41 gesture_consumer_ = consumer; |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool OnTouchEvent(TouchEvent* event); | 44 bool OnTouchEvent(TouchEvent* event); |
| 45 void OnTouchEventAck(uint32_t unique_touch_event_id, bool event_consumed); | 45 void OnTouchEventAck(uint32_t unique_touch_event_id, EventResult result); |
| 46 const MotionEventAura& pointer_state() { return pointer_state_; } | 46 const MotionEventAura& pointer_state() { return pointer_state_; } |
| 47 std::vector<std::unique_ptr<GestureEvent>> GetAndResetPendingGestures(); | 47 std::vector<std::unique_ptr<GestureEvent>> GetAndResetPendingGestures(); |
| 48 void OnTouchEnter(int pointer_id, float x, float y); | 48 void OnTouchEnter(int pointer_id, float x, float y); |
| 49 | 49 |
| 50 // GestureProviderClient implementation | 50 // GestureProviderClient implementation |
| 51 void OnGestureEvent(const GestureEventData& gesture) override; | 51 void OnGestureEvent(const GestureEventData& gesture) override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 GestureProviderAuraClient* client_; | 54 GestureProviderAuraClient* client_; |
| 55 MotionEventAura pointer_state_; | 55 MotionEventAura pointer_state_; |
| 56 FilteredGestureProvider filtered_gesture_provider_; | 56 FilteredGestureProvider filtered_gesture_provider_; |
| 57 | 57 |
| 58 bool handling_event_; | 58 bool handling_event_; |
| 59 std::vector<std::unique_ptr<GestureEvent>> pending_gestures_; | 59 std::vector<std::unique_ptr<GestureEvent>> pending_gestures_; |
| 60 | 60 |
| 61 // |gesture_consumer_| must outlive this object. | 61 // |gesture_consumer_| must outlive this object. |
| 62 GestureConsumer* gesture_consumer_; | 62 GestureConsumer* gesture_consumer_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); | 64 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace ui | 67 } // namespace ui |
| 68 | 68 |
| 69 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ | 69 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ |
| OLD | NEW |