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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 months 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_GESTURE_PROVIDER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "ui/events/gesture_detection/gesture_detection_export.h" 10 #include "ui/events/gesture_detection/gesture_detection_export.h"
10 #include "ui/events/gesture_detection/gesture_detector.h" 11 #include "ui/events/gesture_detection/gesture_detector.h"
11 #include "ui/events/gesture_detection/gesture_event_data.h" 12 #include "ui/events/gesture_detection/gesture_event_data.h"
12 #include "ui/events/gesture_detection/gesture_touch_uma_histogram.h" 13 #include "ui/events/gesture_detection/gesture_touch_uma_histogram.h"
13 #include "ui/events/gesture_detection/scale_gesture_detector.h" 14 #include "ui/events/gesture_detection/scale_gesture_detector.h"
14 #include "ui/events/gesture_detection/snap_scroll_controller.h" 15 #include "ui/events/gesture_detection/snap_scroll_controller.h"
15 #include "ui/gfx/display.h" 16 #include "ui/gfx/display.h"
16 17
17 namespace ui { 18 namespace ui {
18 19
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return current_down_event_.get(); 94 return current_down_event_.get();
94 } 95 }
95 96
96 private: 97 private:
97 bool CanHandle(const MotionEvent& event) const; 98 bool CanHandle(const MotionEvent& event) const;
98 void OnTouchEventHandlingBegin(const MotionEvent& event); 99 void OnTouchEventHandlingBegin(const MotionEvent& event);
99 void OnTouchEventHandlingEnd(const MotionEvent& event); 100 void OnTouchEventHandlingEnd(const MotionEvent& event);
100 void UpdateDoubleTapDetectionSupport(); 101 void UpdateDoubleTapDetectionSupport();
101 102
102 class GestureListenerImpl; 103 class GestureListenerImpl;
103 scoped_ptr<GestureListenerImpl> gesture_listener_; 104 std::unique_ptr<GestureListenerImpl> gesture_listener_;
104 105
105 scoped_ptr<MotionEvent> current_down_event_; 106 std::unique_ptr<MotionEvent> current_down_event_;
106 107
107 // Logs information on touch and gesture events. 108 // Logs information on touch and gesture events.
108 GestureTouchUMAHistogram uma_histogram_; 109 GestureTouchUMAHistogram uma_histogram_;
109 110
110 // Whether double-tap gesture detection is currently supported. 111 // Whether double-tap gesture detection is currently supported.
111 bool double_tap_support_for_page_; 112 bool double_tap_support_for_page_;
112 bool double_tap_support_for_platform_; 113 bool double_tap_support_for_platform_;
113 114
114 const bool gesture_begin_end_types_enabled_; 115 const bool gesture_begin_end_types_enabled_;
115 }; 116 };
116 117
117 } // namespace ui 118 } // namespace ui
118 119
119 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ 120 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_detector.h ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698