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