OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // blink::HoverType enums, enforced by compile-time assertions in | 86 // blink::HoverType enums, enforced by compile-time assertions in |
87 // AssertMatchingEnums.cpp. | 87 // AssertMatchingEnums.cpp. |
88 enum HoverType { | 88 enum HoverType { |
89 HoverTypeNone = 1 << 0, | 89 HoverTypeNone = 1 << 0, |
90 // Indicates that the primary pointing system can hover, but it requires | 90 // Indicates that the primary pointing system can hover, but it requires |
91 // a significant action on the user's part. e.g. hover on "long press". | 91 // a significant action on the user's part. e.g. hover on "long press". |
92 HoverTypeOnDemand = 1 << 1, | 92 HoverTypeOnDemand = 1 << 1, |
93 HoverTypeHover = 1 << 2 | 93 HoverTypeHover = 1 << 2 |
94 }; | 94 }; |
95 | 95 |
| 96 // Selection strategy defines how the selection granularity changes when the |
| 97 // selection extent is moved. |
| 98 enum class SelectionStrategyType { |
| 99 // Always uses character granularity. |
| 100 Character, |
| 101 // "Expand by word, shrink by character" selection strategy. |
| 102 // Uses character granularity when selection is shrinking. If the |
| 103 // selection is expanding, granularity doesn't change until a word |
| 104 // boundary is passed, after which the granularity switches to "word". |
| 105 Direction |
| 106 }; |
| 107 |
96 // Sets value of a setting by its string identifier from Settings.in and | 108 // Sets value of a setting by its string identifier from Settings.in and |
97 // string representation of value. An enum's string representation is the | 109 // string representation of value. An enum's string representation is the |
98 // string representation of the integer value of the enum. | 110 // string representation of the integer value of the enum. |
99 virtual void setFromStrings(const WebString& name, const WebString& value) =
0; | 111 virtual void setFromStrings(const WebString& name, const WebString& value) =
0; |
100 | 112 |
101 virtual bool mainFrameResizesAreOrientationChanges() const = 0; | 113 virtual bool mainFrameResizesAreOrientationChanges() const = 0; |
102 virtual int availablePointerTypes() const = 0; | 114 virtual int availablePointerTypes() const = 0; |
103 virtual PointerType primaryPointerType() const = 0; | 115 virtual PointerType primaryPointerType() const = 0; |
104 virtual int availableHoverTypes() const = 0; | 116 virtual int availableHoverTypes() const = 0; |
105 virtual HoverType primaryHoverType() const = 0; | 117 virtual HoverType primaryHoverType() const = 0; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 virtual void setPrimaryPointerType(PointerType) = 0; | 209 virtual void setPrimaryPointerType(PointerType) = 0; |
198 virtual void setAvailableHoverTypes(int) = 0; | 210 virtual void setAvailableHoverTypes(int) = 0; |
199 virtual void setPrimaryHoverType(HoverType) = 0; | 211 virtual void setPrimaryHoverType(HoverType) = 0; |
200 virtual void setRenderVSyncNotificationEnabled(bool) = 0; | 212 virtual void setRenderVSyncNotificationEnabled(bool) = 0; |
201 virtual void setReportScreenSizeInPhysicalPixelsQuirk(bool) = 0; | 213 virtual void setReportScreenSizeInPhysicalPixelsQuirk(bool) = 0; |
202 virtual void setRootLayerScrolls(bool) = 0; | 214 virtual void setRootLayerScrolls(bool) = 0; |
203 virtual void setRubberBandingOnCompositorThread(bool) = 0; | 215 virtual void setRubberBandingOnCompositorThread(bool) = 0; |
204 virtual void setSansSerifFontFamily(const WebString&, UScriptCode = USCRIPT_
COMMON) = 0; | 216 virtual void setSansSerifFontFamily(const WebString&, UScriptCode = USCRIPT_
COMMON) = 0; |
205 virtual void setSelectTrailingWhitespaceEnabled(bool) = 0; | 217 virtual void setSelectTrailingWhitespaceEnabled(bool) = 0; |
206 virtual void setSelectionIncludesAltImageText(bool) = 0; | 218 virtual void setSelectionIncludesAltImageText(bool) = 0; |
| 219 virtual void setSelectionStrategy(SelectionStrategyType) = 0; |
207 virtual void setSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMM
ON) = 0; | 220 virtual void setSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMM
ON) = 0; |
208 virtual void setShouldPrintBackgrounds(bool) = 0; | 221 virtual void setShouldPrintBackgrounds(bool) = 0; |
209 virtual void setShouldClearDocumentBackground(bool) = 0; | 222 virtual void setShouldClearDocumentBackground(bool) = 0; |
210 virtual void setShouldRespectImageOrientation(bool) = 0; | 223 virtual void setShouldRespectImageOrientation(bool) = 0; |
211 virtual void setShowContextMenuOnMouseUp(bool) = 0; | 224 virtual void setShowContextMenuOnMouseUp(bool) = 0; |
212 virtual void setShowFPSCounter(bool) = 0; | 225 virtual void setShowFPSCounter(bool) = 0; |
213 virtual void setShowPaintRects(bool) = 0; | 226 virtual void setShowPaintRects(bool) = 0; |
214 virtual void setShrinksStandaloneImagesToFit(bool) = 0; | 227 virtual void setShrinksStandaloneImagesToFit(bool) = 0; |
215 virtual void setShrinksViewportContentToFit(bool) = 0; | 228 virtual void setShrinksViewportContentToFit(bool) = 0; |
216 virtual void setSmartInsertDeleteEnabled(bool) = 0; | 229 virtual void setSmartInsertDeleteEnabled(bool) = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 virtual void setWideViewportQuirkEnabled(bool) = 0; | 275 virtual void setWideViewportQuirkEnabled(bool) = 0; |
263 virtual void setXSSAuditorEnabled(bool) = 0; | 276 virtual void setXSSAuditorEnabled(bool) = 0; |
264 | 277 |
265 protected: | 278 protected: |
266 ~WebSettings() { } | 279 ~WebSettings() { } |
267 }; | 280 }; |
268 | 281 |
269 } // namespace blink | 282 } // namespace blink |
270 | 283 |
271 #endif | 284 #endif |
OLD | NEW |