| 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 CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void DestroyTouchSelection() override; | 71 void DestroyTouchSelection() override; |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 TouchEditableImplAura(); | 74 TouchEditableImplAura(); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 friend class TouchEditableImplAuraTest; | 77 friend class TouchEditableImplAuraTest; |
| 78 | 78 |
| 79 // A convenience function that is called after scroll/fling/overscroll ends to | 79 // A convenience function that is called after scroll/fling/overscroll ends to |
| 80 // re-activate touch selection if necessary. | 80 // re-activate touch selection if necessary. |
| 81 void ScrollEnded(); | 81 void StartTouchEditingIfNecessary(); |
| 82 | 82 |
| 83 void Cleanup(); | 83 void Cleanup(); |
| 84 | 84 |
| 85 // Bounds for the selection. | 85 // Bounds for the selection. |
| 86 ui::SelectionBound selection_anchor_; | 86 ui::SelectionBound selection_anchor_; |
| 87 ui::SelectionBound selection_focus_; | 87 ui::SelectionBound selection_focus_; |
| 88 | 88 |
| 89 // The current text input type. | 89 // The current text input type. |
| 90 ui::TextInputType text_input_type_; | 90 ui::TextInputType text_input_type_; |
| 91 | 91 |
| 92 RenderWidgetHostViewAura* rwhva_; | 92 RenderWidgetHostViewAura* rwhva_; |
| 93 scoped_ptr<ui::TouchEditingControllerDeprecated> touch_selection_controller_; | 93 scoped_ptr<ui::TouchEditingControllerDeprecated> touch_selection_controller_; |
| 94 | 94 |
| 95 // True if |rwhva_| is currently handling a gesture that could result in a | 95 // True if |rwhva_| is currently handling a gesture that could result in a |
| 96 // change in selection (long press, double tap or triple tap). | 96 // change in selection (long press, double tap or triple tap). |
| 97 bool selection_gesture_in_process_; | 97 bool selection_gesture_in_process_; |
| 98 | 98 |
| 99 // Set to true if handles are hidden when user is scrolling. Used to determine | 99 // Set to true if handles are hidden when user is scrolling. Used to determine |
| 100 // whether to re-show handles after a scrolling session. | 100 // whether to re-show handles after a scrolling session. |
| 101 bool handles_hidden_due_to_scroll_; | 101 bool handles_hidden_due_to_scroll_; |
| 102 | 102 |
| 103 // Keeps track of number of scrolls/flings/overscrolls in progress. | 103 // Keep track of scrolls/overscrolls in progress. |
| 104 int scrolls_in_progress_; | 104 bool scroll_in_progress_; |
| 105 bool overscroll_in_progress_; |
| 105 | 106 |
| 106 // Used to track if a textfield was focused when the current tap gesture | 107 // Used to track if a textfield was focused when the current tap gesture |
| 107 // happened. | 108 // happened. |
| 108 bool textfield_was_focused_on_tap_; | 109 bool textfield_was_focused_on_tap_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(TouchEditableImplAura); | 111 DISALLOW_COPY_AND_ASSIGN(TouchEditableImplAura); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 } // namespace content | 114 } // namespace content |
| 114 | 115 |
| 115 #endif // CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ | 116 #endif // CONTENT_BROWSER_WEB_CONTENTS_TOUCH_EDITABLE_IMPL_AURA_H_ |
| OLD | NEW |