Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: Source/WebKit/chromium/src/WebRuntimeFeatures.cpp

Issue 14950002: Add enable*Features functions in preparation for using them in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Used the wrong macro for UNUSED, fixed. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/public/WebRuntimeFeatures.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 99b86406227bdfb408d34e01379621542cecb168..747a3010862b8daeeb5585980079d05ccfbee720 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -41,6 +41,72 @@ using namespace WebCore;
namespace WebKit {
+void WebRuntimeFeatures::enableStableFeatures(bool enable)
+{
+ // FIXME: Actually respect the enable arg once the 3-part
+ // change dance with content/ is over.
+ ASSERT_UNUSED(enable, enable);
+
+ // These are copied directly from RenderThreadImpl::InitializeWebKit.
+ // All the "false" values should be removed, and all the flags
+ // which default to "true" in RuntimeEnabledFeatures.cpp
+ // should be moved here or enableTestingFeatures instead.
+ enableDatabase(true);
+ enableApplicationCache(true);
+ enableNotifications(true);
+ enableLocalStorage(true);
+ enableSessionStorage(true);
+ enableIndexedDatabase(true);
+ enableGeolocation(true);
+ enableMediaSource(true);
+ enableMediaPlayer(true);
+ enableMediaStream(true);
+ enablePeerConnection(true);
+ enableFullScreenAPI(true);
+ enableEncryptedMedia(true);
+ enableWebAudio(true);
+ enableWebMIDI(false);
+ enableDeviceMotion(false);
+ enableDeviceOrientation(true);
+ enableSpeechInput(true);
+ enableScriptedSpeech(true);
+ enableGamepad(true);
+ enableFileSystem(true);
+ enableJavaScriptI18NAPI(true);
+ enableQuota(true);
+ enableSeamlessIFrames(false);
+ enableExperimentalWebSocket(false);
+ enableExperimentalCanvasFeatures(false);
+ enableSpeechSynthesis(false);
+}
+
+void WebRuntimeFeatures::enableExperimentalFeatures(bool enable)
+{
+ // FIXME: Actually respect the enable arg once the 3-part
+ // change dance with content/ is over.
+ ASSERT_UNUSED(enable, enable);
+
+ enableStyleScoped(true);
+ enableCustomDOMElements(true);
+ enableCSSExclusions(true);
+ enableExperimentalContentSecurityPolicyFeatures(true);
+ enableCSSRegions(true);
+ enableCSSCompositing(true);
+ enableDialogElement(true);
+ enableFontLoadEvents(true);
+ enableSeamlessIFrames(true);
+}
+
+void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable)
+{
+ // FIXME: This will be populated with features which
+ // are currently initialized true, but always set
+ // to false in enableStableFeatures.
+ // This method should be used by ContentShell
+ // to enable features which should be enabled for
+ // the layout tests but are not yet "experimental".
+}
+
void WebRuntimeFeatures::enableDatabase(bool enable)
{
RuntimeEnabledFeatures::setDatabaseEnabled(enable);
« no previous file with comments | « Source/WebKit/chromium/public/WebRuntimeFeatures.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698