Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ui/events/gesture_detection/filtered_gesture_provider.h

Issue 717573004: [Android] Thoroughly reset gesture detection upon page navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_FILTERED_GESTURE_PROVIDER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/events/gesture_detection/gesture_event_data_packet.h" 9 #include "ui/events/gesture_detection/gesture_event_data_packet.h"
10 #include "ui/events/gesture_detection/gesture_provider.h" 10 #include "ui/events/gesture_detection/gesture_provider.h"
(...skipping 15 matching lines...) Expand all
26 // Returns true if |event| was both valid and successfully handled by the 26 // Returns true if |event| was both valid and successfully handled by the
27 // gesture provider. Otherwise, returns false, in which case the caller 27 // gesture provider. Otherwise, returns false, in which case the caller
28 // should drop |event|, not forwarding it to the renderer. 28 // should drop |event|, not forwarding it to the renderer.
29 bool OnTouchEvent(const MotionEvent& event); 29 bool OnTouchEvent(const MotionEvent& event);
30 30
31 // To be called upon ack of an event that was forwarded after a successful 31 // To be called upon ack of an event that was forwarded after a successful
32 // call to |OnTouchEvent()|. 32 // call to |OnTouchEvent()|.
33 void OnTouchEventAck(bool event_consumed); 33 void OnTouchEventAck(bool event_consumed);
34 34
35 // Methods delegated to |gesture_provider_|. 35 // Methods delegated to |gesture_provider_|.
36 void ResetDetection();
36 void SetMultiTouchZoomSupportEnabled(bool enabled); 37 void SetMultiTouchZoomSupportEnabled(bool enabled);
37 void SetDoubleTapSupportForPlatformEnabled(bool enabled); 38 void SetDoubleTapSupportForPlatformEnabled(bool enabled);
38 void SetDoubleTapSupportForPageEnabled(bool enabled); 39 void SetDoubleTapSupportForPageEnabled(bool enabled);
39 const ui::MotionEvent* GetCurrentDownEvent() const; 40 const ui::MotionEvent* GetCurrentDownEvent() const;
40 41
41 private: 42 private:
42 // GestureProviderClient implementation. 43 // GestureProviderClient implementation.
43 void OnGestureEvent(const ui::GestureEventData& event) override; 44 void OnGestureEvent(const ui::GestureEventData& event) override;
44 45
45 // TouchDispositionGestureFilterClient implementation. 46 // TouchDispositionGestureFilterClient implementation.
46 void ForwardGestureEvent(const ui::GestureEventData& event) override; 47 void ForwardGestureEvent(const ui::GestureEventData& event) override;
47 48
48 GestureProviderClient* const client_; 49 GestureProviderClient* const client_;
49 50
50 ui::GestureProvider gesture_provider_; 51 ui::GestureProvider gesture_provider_;
51 ui::TouchDispositionGestureFilter gesture_filter_; 52 ui::TouchDispositionGestureFilter gesture_filter_;
52 53
53 bool handling_event_; 54 bool handling_event_;
54 ui::GestureEventDataPacket pending_gesture_packet_; 55 ui::GestureEventDataPacket pending_gesture_packet_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(FilteredGestureProvider); 57 DISALLOW_COPY_AND_ASSIGN(FilteredGestureProvider);
57 }; 58 };
58 59
59 } // namespace ui 60 } // namespace ui
60 61
61 #endif // UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_ 62 #endif // UI_EVENTS_GESTURE_DETECTION_FILTERED_GESTURE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698