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 "WebMediaPlayerClientImpl.h" | 34 #include "WebMediaPlayerClientImpl.h" |
35 #include "RuntimeEnabledFeatures.h" | 35 #include "RuntimeEnabledFeatures.h" |
36 #include "modules/websockets/WebSocket.h" | 36 #include "modules/websockets/WebSocket.h" |
37 | 37 |
38 #include <wtf/UnusedParam.h> | 38 #include <wtf/UnusedParam.h> |
39 | 39 |
40 using namespace WebCore; | 40 using namespace WebCore; |
41 | 41 |
42 namespace WebKit { | 42 namespace WebKit { |
43 | 43 |
| 44 void WebRuntimeFeatures::enableStableFeatures(bool enable) |
| 45 { |
| 46 // FIXME: Actually respect the enable arg once the 3-part |
| 47 // change dance with content/ is over. |
| 48 ASSERT_UNUSED(enable, enable); |
| 49 |
| 50 // These are copied directly from RenderThreadImpl::InitializeWebKit. |
| 51 // All the "false" values should be removed, and all the flags |
| 52 // which default to "true" in RuntimeEnabledFeatures.cpp |
| 53 // should be moved here or enableTestingFeatures instead. |
| 54 enableDatabase(true); |
| 55 enableApplicationCache(true); |
| 56 enableNotifications(true); |
| 57 enableLocalStorage(true); |
| 58 enableSessionStorage(true); |
| 59 enableIndexedDatabase(true); |
| 60 enableGeolocation(true); |
| 61 enableMediaSource(true); |
| 62 enableMediaPlayer(true); |
| 63 enableMediaStream(true); |
| 64 enablePeerConnection(true); |
| 65 enableFullScreenAPI(true); |
| 66 enableEncryptedMedia(true); |
| 67 enableWebAudio(true); |
| 68 enableWebMIDI(false); |
| 69 enableDeviceMotion(false); |
| 70 enableDeviceOrientation(true); |
| 71 enableSpeechInput(true); |
| 72 enableScriptedSpeech(true); |
| 73 enableGamepad(true); |
| 74 enableFileSystem(true); |
| 75 enableJavaScriptI18NAPI(true); |
| 76 enableQuota(true); |
| 77 enableSeamlessIFrames(false); |
| 78 enableExperimentalWebSocket(false); |
| 79 enableExperimentalCanvasFeatures(false); |
| 80 enableSpeechSynthesis(false); |
| 81 } |
| 82 |
| 83 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable) |
| 84 { |
| 85 // FIXME: Actually respect the enable arg once the 3-part |
| 86 // change dance with content/ is over. |
| 87 ASSERT_UNUSED(enable, enable); |
| 88 |
| 89 enableStyleScoped(true); |
| 90 enableCustomDOMElements(true); |
| 91 enableCSSExclusions(true); |
| 92 enableExperimentalContentSecurityPolicyFeatures(true); |
| 93 enableCSSRegions(true); |
| 94 enableCSSCompositing(true); |
| 95 enableDialogElement(true); |
| 96 enableFontLoadEvents(true); |
| 97 enableSeamlessIFrames(true); |
| 98 } |
| 99 |
| 100 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable) |
| 101 { |
| 102 // FIXME: This will be populated with features which |
| 103 // are currently initialized true, but always set |
| 104 // to false in enableStableFeatures. |
| 105 // This method should be used by ContentShell |
| 106 // to enable features which should be enabled for |
| 107 // the layout tests but are not yet "experimental". |
| 108 } |
| 109 |
44 void WebRuntimeFeatures::enableDatabase(bool enable) | 110 void WebRuntimeFeatures::enableDatabase(bool enable) |
45 { | 111 { |
46 RuntimeEnabledFeatures::setDatabaseEnabled(enable); | 112 RuntimeEnabledFeatures::setDatabaseEnabled(enable); |
47 } | 113 } |
48 | 114 |
49 bool WebRuntimeFeatures::isDatabaseEnabled() | 115 bool WebRuntimeFeatures::isDatabaseEnabled() |
50 { | 116 { |
51 return RuntimeEnabledFeatures::databaseEnabled(); | 117 return RuntimeEnabledFeatures::databaseEnabled(); |
52 } | 118 } |
53 | 119 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 { | 580 { |
515 RuntimeEnabledFeatures::setSpeechSynthesisEnabled(enable); | 581 RuntimeEnabledFeatures::setSpeechSynthesisEnabled(enable); |
516 } | 582 } |
517 | 583 |
518 bool WebRuntimeFeatures::isSpeechSynthesisEnabled() | 584 bool WebRuntimeFeatures::isSpeechSynthesisEnabled() |
519 { | 585 { |
520 return RuntimeEnabledFeatures::speechSynthesisEnabled(); | 586 return RuntimeEnabledFeatures::speechSynthesisEnabled(); |
521 } | 587 } |
522 | 588 |
523 } // namespace WebKit | 589 } // namespace WebKit |
OLD | NEW |