| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SELECTION_GRANULARITY_ | 5 #ifndef UI_TOUCH_SELECTION_SELECTION_GRANULARITY_ |
| 6 #define UI_TOUCH_SELECTION_SELECTION_GRANULARITY_ | 6 #define UI_TOUCH_SELECTION_SELECTION_GRANULARITY_ |
| 7 | 7 |
| 8 namespace ui { | 8 namespace ui { |
| 9 | 9 |
| 10 enum TextSelectionGranularity { | 10 enum TextSelectionGranularity { |
| 11 CHARACTER_GRANULARITY, | 11 CHARACTER_GRANULARITY, |
| 12 WORD_GRANULARITY, | 12 WORD_GRANULARITY, |
| 13 SENTENCE_GRANULARITY, | 13 SENTENCE_GRANULARITY, |
| 14 LINE_GRANULARITY, | 14 LINE_GRANULARITY, |
| 15 PARAGRAPH_GRANULARITY | 15 PARAGRAPH_GRANULARITY |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 enum TextSelectionGranularityStrategy { |
| 19 // Always using CHARACTER_GRANULARITY |
| 20 GRANULARITY_STRATEGY_DEFAULT, |
| 21 // Switches between WORD_GRANULARITY and CHARACTER_GRANULARITY |
| 22 // Depending on whether the selection or growing or shrinking |
| 23 GRANULARITY_STRATEGY_DIRECTION, |
| 24 // Switches between WORD_GRANULARITY and CHARACTER_GRANULARITY |
| 25 // Depending on the handle move velocity. |
| 26 GRANULARITY_STRATEGY_VELOCITY |
| 27 }; |
| 28 |
| 18 } // namespace ui | 29 } // namespace ui |
| 19 | 30 |
| 20 #endif // UI_TOUCH_SELECTION_SELECTION_GRANULARITY_ | 31 #endif // UI_TOUCH_SELECTION_SELECTION_GRANULARITY_ |
| OLD | NEW |