Chromium Code Reviews| Index: public/web/WebSettings.h |
| diff --git a/public/web/WebSettings.h b/public/web/WebSettings.h |
| index 3121481b60c36c7af8f3145986f2993d26e58f71..bd215a0912882b4d6d3687bfe726106df5eac7ac 100644 |
| --- a/public/web/WebSettings.h |
| +++ b/public/web/WebSettings.h |
| @@ -93,6 +93,18 @@ public: |
| HoverTypeHover = 1 << 2 |
| }; |
| + // Selection strategy defines how the selection granularity changes when the |
| + // selection extent is moved. |
| + enum SelectionStrategyType { |
|
yosin_UTC9
2015/04/21 01:59:52
nit: Let's use enum class for better type checking
mfomitchev
2015/04/21 18:44:25
Done.
|
| + // Always uses character granularity. |
| + StrategyCharacter, |
| + // "Expand by word, shrink by character" selection strategy. |
| + // Uses character granularity when selection is shrinking. If the |
| + // selection is expanding, granularity doesn't change until a word |
| + // boundary is passed, after which the granularity switches to "word". |
| + StrategyDirection |
| + }; |
| + |
| // Sets value of a setting by its string identifier from Settings.in and |
| // string representation of value. An enum's string representation is the |
| // string representation of the integer value of the enum. |
| @@ -204,6 +216,7 @@ public: |
| virtual void setSansSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0; |
| virtual void setSelectTrailingWhitespaceEnabled(bool) = 0; |
| virtual void setSelectionIncludesAltImageText(bool) = 0; |
| + virtual void setSelectionStrategy(SelectionStrategyType) = 0; |
| virtual void setSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0; |
| virtual void setShouldPrintBackgrounds(bool) = 0; |
| virtual void setShouldClearDocumentBackground(bool) = 0; |