| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ | 5 #ifndef UI_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ |
| 6 #define UI_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ | 6 #define UI_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "ui/aura/window_observer.h" | 10 #include "ui/aura/window_observer.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 gfx::Rect GetCursorHandleBounds(); | 115 gfx::Rect GetCursorHandleBounds(); |
| 116 bool IsSelectionHandle1Visible(); | 116 bool IsSelectionHandle1Visible(); |
| 117 bool IsSelectionHandle2Visible(); | 117 bool IsSelectionHandle2Visible(); |
| 118 bool IsCursorHandleVisible(); | 118 bool IsCursorHandleVisible(); |
| 119 gfx::Rect GetExpectedHandleBounds(const ui::SelectionBound& bound); | 119 gfx::Rect GetExpectedHandleBounds(const ui::SelectionBound& bound); |
| 120 views::WidgetDelegateView* GetHandle1View(); | 120 views::WidgetDelegateView* GetHandle1View(); |
| 121 views::WidgetDelegateView* GetHandle2View(); | 121 views::WidgetDelegateView* GetHandle2View(); |
| 122 | 122 |
| 123 ui::TouchEditable* client_view_; | 123 ui::TouchEditable* client_view_; |
| 124 Widget* client_widget_; | 124 Widget* client_widget_; |
| 125 scoped_ptr<EditingHandleView> selection_handle_1_; | 125 std::unique_ptr<EditingHandleView> selection_handle_1_; |
| 126 scoped_ptr<EditingHandleView> selection_handle_2_; | 126 std::unique_ptr<EditingHandleView> selection_handle_2_; |
| 127 scoped_ptr<EditingHandleView> cursor_handle_; | 127 std::unique_ptr<EditingHandleView> cursor_handle_; |
| 128 bool command_executed_; | 128 bool command_executed_; |
| 129 base::TimeTicks selection_start_time_; | 129 base::TimeTicks selection_start_time_; |
| 130 | 130 |
| 131 // Timer to trigger quick menu (Quick menu is not shown if the selection | 131 // Timer to trigger quick menu (Quick menu is not shown if the selection |
| 132 // handles are being updated. It appears only when the handles are stationary | 132 // handles are being updated. It appears only when the handles are stationary |
| 133 // for a certain amount of time). | 133 // for a certain amount of time). |
| 134 base::OneShotTimer quick_menu_timer_; | 134 base::OneShotTimer quick_menu_timer_; |
| 135 | 135 |
| 136 // Pointer to the SelectionHandleView being dragged during a drag session. | 136 // Pointer to the SelectionHandleView being dragged during a drag session. |
| 137 EditingHandleView* dragging_handle_; | 137 EditingHandleView* dragging_handle_; |
| 138 | 138 |
| 139 // In cursor mode, the two selection bounds are the same and correspond to | 139 // In cursor mode, the two selection bounds are the same and correspond to |
| 140 // |cursor_handle_|; otherwise, they correspond to |selection_handle_1_| and | 140 // |cursor_handle_|; otherwise, they correspond to |selection_handle_1_| and |
| 141 // |selection_handle_2_|, respectively. These values should be used when | 141 // |selection_handle_2_|, respectively. These values should be used when |
| 142 // selection bounds needed rather than position of handles which might be | 142 // selection bounds needed rather than position of handles which might be |
| 143 // invalid when handles are hidden. | 143 // invalid when handles are hidden. |
| 144 ui::SelectionBound selection_bound_1_; | 144 ui::SelectionBound selection_bound_1_; |
| 145 ui::SelectionBound selection_bound_2_; | 145 ui::SelectionBound selection_bound_2_; |
| 146 | 146 |
| 147 // Selection bounds, clipped to client view's boundaries. | 147 // Selection bounds, clipped to client view's boundaries. |
| 148 ui::SelectionBound selection_bound_1_clipped_; | 148 ui::SelectionBound selection_bound_1_clipped_; |
| 149 ui::SelectionBound selection_bound_2_clipped_; | 149 ui::SelectionBound selection_bound_2_clipped_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerImpl); | 151 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerImpl); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace views | 154 } // namespace views |
| 155 | 155 |
| 156 #endif // UI_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ | 156 #endif // UI_UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ |
| OLD | NEW |