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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 }; | 106 }; |
107 | 107 |
108 // Defines the default for 'passive' field used in the AddEventListenerOptions | 108 // Defines the default for 'passive' field used in the AddEventListenerOptions |
109 // interface when javascript calls addEventListener. | 109 // interface when javascript calls addEventListener. |
110 enum class PassiveEventListenerDefault { | 110 enum class PassiveEventListenerDefault { |
111 kFalse, // Default of false. | 111 kFalse, // Default of false. |
112 kTrue, // Default of true. | 112 kTrue, // Default of true. |
113 kForceAllTrue // Force all values to be true even when specified. | 113 kForceAllTrue // Force all values to be true even when specified. |
114 }; | 114 }; |
115 | 115 |
| 116 // Defines the autoplay policy to be used. Should match the enum class in |
| 117 // web_preferences.h |
| 118 enum class AutoplayPolicy { |
| 119 kNoUserGestureRequired = 0, |
| 120 kUserGestureRequired, |
| 121 kUserGestureRequiredForCrossOrigin, |
| 122 }; |
| 123 |
116 // Sets value of a setting by its string identifier from Settings.in and | 124 // Sets value of a setting by its string identifier from Settings.in and |
117 // string representation of value. An enum's string representation is the | 125 // string representation of value. An enum's string representation is the |
118 // string representation of the integer value of the enum. | 126 // string representation of the integer value of the enum. |
119 virtual void SetFromStrings(const WebString& name, | 127 virtual void SetFromStrings(const WebString& name, |
120 const WebString& value) = 0; | 128 const WebString& value) = 0; |
121 | 129 |
122 virtual bool ShrinksViewportContentToFit() const = 0; | 130 virtual bool ShrinksViewportContentToFit() const = 0; |
123 virtual bool ViewportEnabled() const = 0; | 131 virtual bool ViewportEnabled() const = 0; |
124 virtual void SetAccelerated2dCanvasMSAASampleCount(int) = 0; | 132 virtual void SetAccelerated2dCanvasMSAASampleCount(int) = 0; |
125 virtual void SetAcceleratedCompositingEnabled(bool) = 0; | 133 virtual void SetAcceleratedCompositingEnabled(bool) = 0; |
(...skipping 12 matching lines...) Expand all Loading... |
138 // If set to true, allows frames with an https origin to run active | 146 // If set to true, allows frames with an https origin to run active |
139 // contents at an insecure URL. This includes WebSockets. Otherwise, | 147 // contents at an insecure URL. This includes WebSockets. Otherwise, |
140 // disallows it. The LocalFrameClient set to the frame may override the | 148 // disallows it. The LocalFrameClient set to the frame may override the |
141 // value set by this method. | 149 // value set by this method. |
142 virtual void SetAllowRunningOfInsecureContent(bool) = 0; | 150 virtual void SetAllowRunningOfInsecureContent(bool) = 0; |
143 virtual void SetAllowScriptsToCloseWindows(bool) = 0; | 151 virtual void SetAllowScriptsToCloseWindows(bool) = 0; |
144 virtual void SetAllowUniversalAccessFromFileURLs(bool) = 0; | 152 virtual void SetAllowUniversalAccessFromFileURLs(bool) = 0; |
145 virtual void SetAlwaysShowContextMenuOnTouch(bool) = 0; | 153 virtual void SetAlwaysShowContextMenuOnTouch(bool) = 0; |
146 virtual void SetAntialiased2dCanvasEnabled(bool) = 0; | 154 virtual void SetAntialiased2dCanvasEnabled(bool) = 0; |
147 virtual void SetAntialiasedClips2dCanvasEnabled(bool) = 0; | 155 virtual void SetAntialiasedClips2dCanvasEnabled(bool) = 0; |
| 156 virtual void SetAutoplayPolicy(AutoplayPolicy) = 0; |
148 virtual void SetAutoZoomFocusedNodeToLegibleScale(bool) = 0; | 157 virtual void SetAutoZoomFocusedNodeToLegibleScale(bool) = 0; |
149 virtual void SetBrowserSideNavigationEnabled(bool) = 0; | 158 virtual void SetBrowserSideNavigationEnabled(bool) = 0; |
150 virtual void SetClobberUserAgentInitialScaleQuirk(bool) = 0; | 159 virtual void SetClobberUserAgentInitialScaleQuirk(bool) = 0; |
151 virtual void SetCookieEnabled(bool) = 0; | 160 virtual void SetCookieEnabled(bool) = 0; |
152 virtual void SetCrossOriginMediaPlaybackRequiresUserGesture(bool) = 0; | |
153 virtual void SetNavigateOnDragDrop(bool) = 0; | 161 virtual void SetNavigateOnDragDrop(bool) = 0; |
154 virtual void SetCursiveFontFamily(const WebString&, | 162 virtual void SetCursiveFontFamily(const WebString&, |
155 UScriptCode = USCRIPT_COMMON) = 0; | 163 UScriptCode = USCRIPT_COMMON) = 0; |
156 virtual void SetDNSPrefetchingEnabled(bool) = 0; | 164 virtual void SetDNSPrefetchingEnabled(bool) = 0; |
157 virtual void SetDataSaverEnabled(bool) = 0; | 165 virtual void SetDataSaverEnabled(bool) = 0; |
158 virtual void SetDOMPasteAllowed(bool) = 0; | 166 virtual void SetDOMPasteAllowed(bool) = 0; |
159 virtual void SetDefaultFixedFontSize(int) = 0; | 167 virtual void SetDefaultFixedFontSize(int) = 0; |
160 virtual void SetDefaultFontSize(int) = 0; | 168 virtual void SetDefaultFontSize(int) = 0; |
161 virtual void SetDefaultTextEncodingName(const WebString&) = 0; | 169 virtual void SetDefaultTextEncodingName(const WebString&) = 0; |
162 virtual void SetDefaultVideoPosterURL(const WebString&) = 0; | 170 virtual void SetDefaultVideoPosterURL(const WebString&) = 0; |
(...skipping 27 matching lines...) Expand all Loading... |
190 virtual void SetJavaScriptCanOpenWindowsAutomatically(bool) = 0; | 198 virtual void SetJavaScriptCanOpenWindowsAutomatically(bool) = 0; |
191 virtual void SetJavaScriptEnabled(bool) = 0; | 199 virtual void SetJavaScriptEnabled(bool) = 0; |
192 virtual void SetLoadsImagesAutomatically(bool) = 0; | 200 virtual void SetLoadsImagesAutomatically(bool) = 0; |
193 virtual void SetLoadWithOverviewMode(bool) = 0; | 201 virtual void SetLoadWithOverviewMode(bool) = 0; |
194 virtual void SetShouldReuseGlobalForUnownedMainFrame(bool) = 0; | 202 virtual void SetShouldReuseGlobalForUnownedMainFrame(bool) = 0; |
195 virtual void SetProgressBarCompletion(ProgressBarCompletion) = 0; | 203 virtual void SetProgressBarCompletion(ProgressBarCompletion) = 0; |
196 virtual void SetLocalStorageEnabled(bool) = 0; | 204 virtual void SetLocalStorageEnabled(bool) = 0; |
197 virtual void SetMainFrameClipsContent(bool) = 0; | 205 virtual void SetMainFrameClipsContent(bool) = 0; |
198 virtual void SetMainFrameResizesAreOrientationChanges(bool) = 0; | 206 virtual void SetMainFrameResizesAreOrientationChanges(bool) = 0; |
199 virtual void SetMaxTouchPoints(int) = 0; | 207 virtual void SetMaxTouchPoints(int) = 0; |
200 virtual void SetMediaPlaybackRequiresUserGesture(bool) = 0; | |
201 virtual void SetMediaPlaybackGestureWhitelistScope(const WebString&) = 0; | 208 virtual void SetMediaPlaybackGestureWhitelistScope(const WebString&) = 0; |
202 virtual void SetPresentationRequiresUserGesture(bool) = 0; | 209 virtual void SetPresentationRequiresUserGesture(bool) = 0; |
203 virtual void SetEmbeddedMediaExperienceEnabled(bool) = 0; | 210 virtual void SetEmbeddedMediaExperienceEnabled(bool) = 0; |
204 virtual void SetMinimumAccelerated2dCanvasSize(int) = 0; | 211 virtual void SetMinimumAccelerated2dCanvasSize(int) = 0; |
205 virtual void SetMinimumFontSize(int) = 0; | 212 virtual void SetMinimumFontSize(int) = 0; |
206 virtual void SetMinimumLogicalFontSize(int) = 0; | 213 virtual void SetMinimumLogicalFontSize(int) = 0; |
207 virtual void SetMockScrollbarsEnabled(bool) = 0; | 214 virtual void SetMockScrollbarsEnabled(bool) = 0; |
208 virtual void SetHideScrollbars(bool) = 0; | 215 virtual void SetHideScrollbars(bool) = 0; |
209 virtual void SetOfflineWebApplicationCacheEnabled(bool) = 0; | 216 virtual void SetOfflineWebApplicationCacheEnabled(bool) = 0; |
210 virtual void SetPassiveEventListenerDefault(PassiveEventListenerDefault) = 0; | 217 virtual void SetPassiveEventListenerDefault(PassiveEventListenerDefault) = 0; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 virtual void SetMediaControlsEnabled(bool) = 0; | 304 virtual void SetMediaControlsEnabled(bool) = 0; |
298 virtual void SetDoNotUpdateSelectionOnMutatingSelectionRange(bool) = 0; | 305 virtual void SetDoNotUpdateSelectionOnMutatingSelectionRange(bool) = 0; |
299 | 306 |
300 protected: | 307 protected: |
301 ~WebSettings() {} | 308 ~WebSettings() {} |
302 }; | 309 }; |
303 | 310 |
304 } // namespace blink | 311 } // namespace blink |
305 | 312 |
306 #endif | 313 #endif |
OLD | NEW |