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

Side by Side Diff: ui/touch_selection/touch_selection_controller.h

Issue 1102933003: [Contextual Search] Add support for tap on the selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ 5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_
6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_
7 7
8 #include "ui/base/touch/selection_bound.h" 8 #include "ui/base/touch/selection_bound.h"
9 #include "ui/gfx/geometry/point_f.h" 9 #include "ui/gfx/geometry/point_f.h"
10 #include "ui/gfx/geometry/rect_f.h" 10 #include "ui/gfx/geometry/rect_f.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void OnSelectionBoundsChanged(const SelectionBound& start, 48 void OnSelectionBoundsChanged(const SelectionBound& start,
49 const SelectionBound& end); 49 const SelectionBound& end);
50 50
51 // Allows touch-dragging of the handle. 51 // Allows touch-dragging of the handle.
52 // Returns true iff the event was consumed, in which case the caller should 52 // Returns true iff the event was consumed, in which case the caller should
53 // cease further handling of the event. 53 // cease further handling of the event.
54 bool WillHandleTouchEvent(const MotionEvent& event); 54 bool WillHandleTouchEvent(const MotionEvent& event);
55 55
56 // To be called before forwarding a tap event. This allows automatically 56 // To be called before forwarding a tap event. This allows automatically
57 // showing the insertion handle from subsequent bounds changes. 57 // showing the insertion handle from subsequent bounds changes.
58 void OnTapEvent(); 58 bool WillHandleTapEvent(const gfx::PointF& location);
59 59
60 // To be called before forwarding a longpress event. This allows automatically 60 // To be called before forwarding a longpress event. This allows automatically
61 // showing the selection or insertion handles from subsequent bounds changes. 61 // showing the selection or insertion handles from subsequent bounds changes.
62 void OnLongPressEvent(); 62 bool WillHandleLongPressEvent(const gfx::PointF& location);
63 63
64 // Allow showing the selection handles from the most recent selection bounds 64 // Allow showing the selection handles from the most recent selection bounds
65 // update (if valid), or a future valid bounds update. 65 // update (if valid), or a future valid bounds update.
66 void AllowShowingFromCurrentSelection(); 66 void AllowShowingFromCurrentSelection();
67 67
68 // Hide the handles and suppress bounds updates until the next explicit 68 // Hide the handles and suppress bounds updates until the next explicit
69 // showing allowance. 69 // showing allowance.
70 void HideAndDisallowShowingAutomatically(); 70 void HideAndDisallowShowingAutomatically();
71 71
72 // Override the handle visibility according to |hidden|. 72 // Override the handle visibility according to |hidden|.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Whether a selection handle was dragged during the current 'selection 164 // Whether a selection handle was dragged during the current 'selection
165 // session' - i.e. since the current selection has been activated. 165 // session' - i.e. since the current selection has been activated.
166 bool selection_handle_dragged_; 166 bool selection_handle_dragged_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); 168 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController);
169 }; 169 };
170 170
171 } // namespace ui 171 } // namespace ui
172 172
173 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ 173 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698