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 23 matching lines...) Expand all Loading... |
34 #include "../platform/PointerProperties.h" | 34 #include "../platform/PointerProperties.h" |
35 #include "../platform/WebCommon.h" | 35 #include "../platform/WebCommon.h" |
36 #include "../platform/WebSize.h" | 36 #include "../platform/WebSize.h" |
37 #include "../platform/WebViewportStyle.h" | 37 #include "../platform/WebViewportStyle.h" |
38 #include <unicode/uscript.h> | 38 #include <unicode/uscript.h> |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class WebString; | 42 class WebString; |
43 | 43 |
44 // WebSettings is owned by the WebView and allows code to modify the settings fo
r | 44 // WebSettings is owned by the WebView and allows code to modify the settings |
45 // the WebView's page without any knowledge of WebCore itself. For the most par
t, | 45 // for the WebView's page without any knowledge of WebCore itself. For the most |
46 // these functions have a 1:1 mapping with the methods in WebCore/page/Settings.
h. | 46 // part, these functions have a 1:1 mapping with the methods in |
| 47 // WebCore/page/Settings.h. |
47 class WebSettings { | 48 class WebSettings { |
48 public: | 49 public: |
49 enum ImageAnimationPolicy { | 50 enum ImageAnimationPolicy { |
50 ImageAnimationPolicyAllowed, | 51 ImageAnimationPolicyAllowed, |
51 ImageAnimationPolicyAnimateOnce, | 52 ImageAnimationPolicyAnimateOnce, |
52 ImageAnimationPolicyNoAnimation | 53 ImageAnimationPolicyNoAnimation |
53 }; | 54 }; |
54 | 55 |
55 enum EditingBehavior { | 56 enum EditingBehavior { |
56 EditingBehaviorMac, | 57 EditingBehaviorMac, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Uses character granularity when selection is shrinking. If the | 90 // Uses character granularity when selection is shrinking. If the |
90 // selection is expanding, granularity doesn't change until a word | 91 // selection is expanding, granularity doesn't change until a word |
91 // boundary is passed, after which the granularity switches to "word". | 92 // boundary is passed, after which the granularity switches to "word". |
92 Direction | 93 Direction |
93 }; | 94 }; |
94 | 95 |
95 // Defines user preference for text track kind. | 96 // Defines user preference for text track kind. |
96 enum class TextTrackKindUserPreference { | 97 enum class TextTrackKindUserPreference { |
97 // Display only tracks marked as default | 98 // Display only tracks marked as default |
98 Default, | 99 Default, |
99 // If available, display captions track in preferred language, else display
subtitles. | 100 // If available, display captions track in preferred language, else display |
| 101 // subtitles. |
100 Captions, | 102 Captions, |
101 // If available, display subtitles track in preferred language, else display
captions. | 103 // If available, display subtitles track in preferred language, else display |
| 104 // captions. |
102 Subtitles | 105 Subtitles |
103 }; | 106 }; |
104 | 107 |
105 // Defines the default for 'passive' field used in the AddEventListenerOptions
interface | 108 // Defines the default for 'passive' field used in the AddEventListenerOptions |
106 // when javascript calls addEventListener. | 109 // interface when javascript calls addEventListener. |
107 enum class PassiveEventListenerDefault { | 110 enum class PassiveEventListenerDefault { |
108 False, // Default of false. | 111 False, // Default of false. |
109 True, // Default of true. | 112 True, // Default of true. |
110 ForceAllTrue // Force all values to be true even when specified. | 113 ForceAllTrue // Force all values to be true even when specified. |
111 }; | 114 }; |
112 | 115 |
113 // Sets value of a setting by its string identifier from Settings.in and | 116 // Sets value of a setting by its string identifier from Settings.in and |
114 // string representation of value. An enum's string representation is the | 117 // string representation of value. An enum's string representation is the |
115 // string representation of the integer value of the enum. | 118 // string representation of the integer value of the enum. |
116 virtual void setFromStrings(const WebString& name, | 119 virtual void setFromStrings(const WebString& name, |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 virtual void setWideViewportQuirkEnabled(bool) = 0; | 291 virtual void setWideViewportQuirkEnabled(bool) = 0; |
289 virtual void setXSSAuditorEnabled(bool) = 0; | 292 virtual void setXSSAuditorEnabled(bool) = 0; |
290 | 293 |
291 protected: | 294 protected: |
292 ~WebSettings() {} | 295 ~WebSettings() {} |
293 }; | 296 }; |
294 | 297 |
295 } // namespace blink | 298 } // namespace blink |
296 | 299 |
297 #endif | 300 #endif |
OLD | NEW |