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

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

Issue 903143003: wip: Touch Text Selection Prototypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@selection_granularity_on_unified
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/touch_selection/touch_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/touch_selection/touch_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698