OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 27 matching lines...) Expand all Loading... |
38 // This class is used to enable runtime features of Blink. | 38 // This class is used to enable runtime features of Blink. |
39 // All features are disabled by default. | 39 // All features are disabled by default. |
40 // Most clients should call enableStableFeatures() to enable | 40 // Most clients should call enableStableFeatures() to enable |
41 // features Blink has made API commitments to. | 41 // features Blink has made API commitments to. |
42 class WebRuntimeFeatures { | 42 class WebRuntimeFeatures { |
43 public: | 43 public: |
44 WEBKIT_EXPORT static void enableStableFeatures(bool); | 44 WEBKIT_EXPORT static void enableStableFeatures(bool); |
45 WEBKIT_EXPORT static void enableExperimentalFeatures(bool); | 45 WEBKIT_EXPORT static void enableExperimentalFeatures(bool); |
46 WEBKIT_EXPORT static void enableTestOnlyFeatures(bool); | 46 WEBKIT_EXPORT static void enableTestOnlyFeatures(bool); |
47 | 47 |
| 48 // FIXME: Delete after removing all callers in Content. |
| 49 static void enableFullScreenAPI(bool enable) { enableFullscreen(enable); } |
| 50 static void enableIndexedDatabase(bool enable) { enableIndexedDB(enable); } |
| 51 static void enableWebAudio(bool enable) { enableAudioContext(enable); } |
| 52 |
48 WEBKIT_EXPORT static void enableApplicationCache(bool); | 53 WEBKIT_EXPORT static void enableApplicationCache(bool); |
49 WEBKIT_EXPORT static bool isApplicationCacheEnabled(); | 54 WEBKIT_EXPORT static bool isApplicationCacheEnabled(); |
50 | 55 |
| 56 WEBKIT_EXPORT static void enableAudioContext(bool); |
| 57 WEBKIT_EXPORT static bool isAudioContextEnabled(); |
| 58 |
51 WEBKIT_EXPORT static void enableCanvasPath(bool); | 59 WEBKIT_EXPORT static void enableCanvasPath(bool); |
52 WEBKIT_EXPORT static bool isCanvasPathEnabled(); | 60 WEBKIT_EXPORT static bool isCanvasPathEnabled(); |
53 | 61 |
54 WEBKIT_EXPORT static void enableCSSCompositing(bool); | 62 WEBKIT_EXPORT static void enableCSSCompositing(bool); |
55 WEBKIT_EXPORT static bool isCSSCompositingEnabled(); | 63 WEBKIT_EXPORT static bool isCSSCompositingEnabled(); |
56 | 64 |
57 WEBKIT_EXPORT static void enableCSSExclusions(bool); | 65 WEBKIT_EXPORT static void enableCSSExclusions(bool); |
58 WEBKIT_EXPORT static bool isCSSExclusionsEnabled(); | 66 WEBKIT_EXPORT static bool isCSSExclusionsEnabled(); |
59 | 67 |
60 WEBKIT_EXPORT static void enableCSSRegions(bool); | 68 WEBKIT_EXPORT static void enableCSSRegions(bool); |
(...skipping 14 matching lines...) Expand all Loading... |
75 WEBKIT_EXPORT static void enableDialogElement(bool); | 83 WEBKIT_EXPORT static void enableDialogElement(bool); |
76 WEBKIT_EXPORT static bool isDialogElementEnabled(); | 84 WEBKIT_EXPORT static bool isDialogElementEnabled(); |
77 | 85 |
78 WEBKIT_EXPORT static void enableDirectoryUpload(bool); | 86 WEBKIT_EXPORT static void enableDirectoryUpload(bool); |
79 WEBKIT_EXPORT static bool isDirectoryUploadEnabled(); | 87 WEBKIT_EXPORT static bool isDirectoryUploadEnabled(); |
80 | 88 |
81 WEBKIT_EXPORT static void enableEncryptedMedia(bool); | 89 WEBKIT_EXPORT static void enableEncryptedMedia(bool); |
82 WEBKIT_EXPORT static bool isEncryptedMediaEnabled(); | 90 WEBKIT_EXPORT static bool isEncryptedMediaEnabled(); |
83 | 91 |
84 WEBKIT_EXPORT static void enableExperimentalCanvasFeatures(bool); | 92 WEBKIT_EXPORT static void enableExperimentalCanvasFeatures(bool); |
85 WEBKIT_EXPORT static bool areExperimentalCanvasFeaturesEnabled(); | 93 WEBKIT_EXPORT static bool isExperimentalCanvasFeaturesEnabled(); |
86 | 94 |
87 WEBKIT_EXPORT static void enableExperimentalContentSecurityPolicyFeatures(bo
ol); | 95 WEBKIT_EXPORT static void enableExperimentalContentSecurityPolicyFeatures(bo
ol); |
88 WEBKIT_EXPORT static bool isExperimentalContentSecurityPolicyFeaturesEnabled
(); | 96 WEBKIT_EXPORT static bool isExperimentalContentSecurityPolicyFeaturesEnabled
(); |
89 | 97 |
90 WEBKIT_EXPORT static void enableExperimentalShadowDOM(bool); | 98 WEBKIT_EXPORT static void enableExperimentalShadowDOM(bool); |
91 WEBKIT_EXPORT static bool isExperimentalShadowDOMEnabled(); | 99 WEBKIT_EXPORT static bool isExperimentalShadowDOMEnabled(); |
92 | 100 |
93 WEBKIT_EXPORT static void enableExperimentalWebSocket(bool); | 101 WEBKIT_EXPORT static void enableExperimentalWebSocket(bool); |
94 WEBKIT_EXPORT static bool isExperimentalWebSocketEnabled(); | 102 WEBKIT_EXPORT static bool isExperimentalWebSocketEnabled(); |
95 | 103 |
96 WEBKIT_EXPORT static void enableFileSystem(bool); | 104 WEBKIT_EXPORT static void enableFileSystem(bool); |
97 WEBKIT_EXPORT static bool isFileSystemEnabled(); | 105 WEBKIT_EXPORT static bool isFileSystemEnabled(); |
98 | 106 |
99 WEBKIT_EXPORT static void enableFontLoadEvents(bool); | 107 WEBKIT_EXPORT static void enableFontLoadEvents(bool); |
100 WEBKIT_EXPORT static bool isFontLoadEventsEnabled(); | 108 WEBKIT_EXPORT static bool isFontLoadEventsEnabled(); |
101 | 109 |
102 WEBKIT_EXPORT static void enableFullScreenAPI(bool); | 110 WEBKIT_EXPORT static void enableFullscreen(bool); |
103 WEBKIT_EXPORT static bool isFullScreenAPIEnabled(); | 111 WEBKIT_EXPORT static bool isFullscreenEnabled(); |
104 | 112 |
105 WEBKIT_EXPORT static void enableGamepad(bool); | 113 WEBKIT_EXPORT static void enableGamepad(bool); |
106 WEBKIT_EXPORT static bool isGamepadEnabled(); | 114 WEBKIT_EXPORT static bool isGamepadEnabled(); |
107 | 115 |
108 WEBKIT_EXPORT static void enableGeolocation(bool); | 116 WEBKIT_EXPORT static void enableGeolocation(bool); |
109 WEBKIT_EXPORT static bool isGeolocationEnabled(); | 117 WEBKIT_EXPORT static bool isGeolocationEnabled(); |
110 | 118 |
111 WEBKIT_EXPORT static void enableIMEAPI(bool); | 119 WEBKIT_EXPORT static void enableIMEAPI(bool); |
112 WEBKIT_EXPORT static bool isIMEAPIEnabled(); | 120 WEBKIT_EXPORT static bool isIMEAPIEnabled(); |
113 | 121 |
114 WEBKIT_EXPORT static void enableIndexedDatabase(bool); | 122 WEBKIT_EXPORT static void enableIndexedDB(bool); |
115 WEBKIT_EXPORT static bool isIndexedDatabaseEnabled(); | 123 WEBKIT_EXPORT static bool isIndexedDBEnabled(); |
116 | 124 |
117 WEBKIT_EXPORT static void enableInputTypeDateTime(bool); | 125 WEBKIT_EXPORT static void enableInputTypeDateTime(bool); |
118 WEBKIT_EXPORT static bool isInputTypeDateTimeEnabled(); | 126 WEBKIT_EXPORT static bool isInputTypeDateTimeEnabled(); |
119 | 127 |
120 WEBKIT_EXPORT static void enableInputTypeWeek(bool); | 128 WEBKIT_EXPORT static void enableInputTypeWeek(bool); |
121 WEBKIT_EXPORT static bool isInputTypeWeekEnabled(); | 129 WEBKIT_EXPORT static bool isInputTypeWeekEnabled(); |
122 | 130 |
123 WEBKIT_EXPORT static void enableJavaScriptI18NAPI(bool); | 131 WEBKIT_EXPORT static void enableJavaScriptI18NAPI(bool); |
124 WEBKIT_EXPORT static bool isJavaScriptI18NAPIEnabled(); | 132 WEBKIT_EXPORT static bool isJavaScriptI18NAPIEnabled(); |
125 | 133 |
(...skipping 21 matching lines...) Expand all Loading... |
147 WEBKIT_EXPORT static void enableQuota(bool); | 155 WEBKIT_EXPORT static void enableQuota(bool); |
148 WEBKIT_EXPORT static bool isQuotaEnabled(); | 156 WEBKIT_EXPORT static bool isQuotaEnabled(); |
149 | 157 |
150 WEBKIT_EXPORT static void enableRequestAutocomplete(bool); | 158 WEBKIT_EXPORT static void enableRequestAutocomplete(bool); |
151 WEBKIT_EXPORT static bool isRequestAutocompleteEnabled(); | 159 WEBKIT_EXPORT static bool isRequestAutocompleteEnabled(); |
152 | 160 |
153 WEBKIT_EXPORT static void enableScriptedSpeech(bool); | 161 WEBKIT_EXPORT static void enableScriptedSpeech(bool); |
154 WEBKIT_EXPORT static bool isScriptedSpeechEnabled(); | 162 WEBKIT_EXPORT static bool isScriptedSpeechEnabled(); |
155 | 163 |
156 WEBKIT_EXPORT static void enableSeamlessIFrames(bool); | 164 WEBKIT_EXPORT static void enableSeamlessIFrames(bool); |
157 WEBKIT_EXPORT static bool areSeamlessIFramesEnabled(); | 165 WEBKIT_EXPORT static bool isSeamlessIFramesEnabled(); |
158 | 166 |
159 WEBKIT_EXPORT static void enableSessionStorage(bool); | 167 WEBKIT_EXPORT static void enableSessionStorage(bool); |
160 WEBKIT_EXPORT static bool isSessionStorageEnabled(); | 168 WEBKIT_EXPORT static bool isSessionStorageEnabled(); |
161 | 169 |
162 WEBKIT_EXPORT static void enableSpeechInput(bool); | 170 WEBKIT_EXPORT static void enableSpeechInput(bool); |
163 WEBKIT_EXPORT static bool isSpeechInputEnabled(); | 171 WEBKIT_EXPORT static bool isSpeechInputEnabled(); |
164 | 172 |
165 WEBKIT_EXPORT static void enableSpeechSynthesis(bool); | 173 WEBKIT_EXPORT static void enableSpeechSynthesis(bool); |
166 WEBKIT_EXPORT static bool isSpeechSynthesisEnabled(); | 174 WEBKIT_EXPORT static bool isSpeechSynthesisEnabled(); |
167 | 175 |
168 WEBKIT_EXPORT static void enableStyleScoped(bool); | 176 WEBKIT_EXPORT static void enableStyleScoped(bool); |
169 WEBKIT_EXPORT static bool isStyleScopedEnabled(); | 177 WEBKIT_EXPORT static bool isStyleScopedEnabled(); |
170 | 178 |
171 WEBKIT_EXPORT static void enableTouch(bool); | 179 WEBKIT_EXPORT static void enableTouch(bool); |
172 WEBKIT_EXPORT static bool isTouchEnabled(); | 180 WEBKIT_EXPORT static bool isTouchEnabled(); |
173 | 181 |
174 WEBKIT_EXPORT static void enableVideoTrack(bool); | 182 WEBKIT_EXPORT static void enableVideoTrack(bool); |
175 WEBKIT_EXPORT static bool isVideoTrackEnabled(); | 183 WEBKIT_EXPORT static bool isVideoTrackEnabled(); |
176 | 184 |
177 WEBKIT_EXPORT static void enableWebAudio(bool); | |
178 WEBKIT_EXPORT static bool isWebAudioEnabled(); | |
179 | |
180 WEBKIT_EXPORT static void enableWebMIDI(bool); | 185 WEBKIT_EXPORT static void enableWebMIDI(bool); |
181 WEBKIT_EXPORT static bool isWebMIDIEnabled(); | 186 WEBKIT_EXPORT static bool isWebMIDIEnabled(); |
182 | 187 |
183 WEBKIT_EXPORT static void enableWebPInAcceptHeader(bool); | 188 WEBKIT_EXPORT static void enableWebPInAcceptHeader(bool); |
184 WEBKIT_EXPORT static bool isWebPInAcceptHeaderEnabled(); | 189 WEBKIT_EXPORT static bool isWebPInAcceptHeaderEnabled(); |
185 | 190 |
186 WEBKIT_EXPORT static void enableXHRResponseBlob(bool); | 191 WEBKIT_EXPORT static void enableXHRResponseBlob(bool); |
187 WEBKIT_EXPORT static bool isXHRResponseBlobEnabled(); | 192 WEBKIT_EXPORT static bool isXHRResponseBlobEnabled(); |
188 | 193 |
189 private: | 194 private: |
190 WebRuntimeFeatures(); | 195 WebRuntimeFeatures(); |
191 }; | 196 }; |
192 | 197 |
193 } // namespace WebKit | 198 } // namespace WebKit |
194 | 199 |
195 #endif | 200 #endif |
OLD | NEW |