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 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 using namespace WebCore; | 38 using namespace WebCore; |
39 | 39 |
40 namespace WebKit { | 40 namespace WebKit { |
41 | 41 |
42 void WebRuntimeFeatures::enableStableFeatures(bool enable) | 42 void WebRuntimeFeatures::enableStableFeatures(bool enable) |
43 { | 43 { |
44 enableApplicationCache(enable); | 44 RuntimeEnabledFeatures::setStableFeaturesEnabled(enable); |
45 enableDatabase(enable); | 45 // FIXME: enableMediaPlayer does not use RuntimeEnabledFeatures |
46 enableDeviceOrientation(enable); | 46 // and does not belong as part of WebRuntimeFeatures. |
47 enableDirectoryUpload(enable); | |
48 enableEncryptedMedia(enable); | |
49 enableFileSystem(enable); | |
50 enableFullscreen(enable); | |
51 enableGamepad(enable); | |
52 enableGeolocation(enable); | |
53 enableIndexedDB(enable); | |
54 enableInputTypeWeek(enable); | |
55 enableJavaScriptI18NAPI(enable); | |
56 enableLocalStorage(enable); | |
57 enableMediaPlayer(enable); | 47 enableMediaPlayer(enable); |
58 enableMediaSource(enable); | |
59 enableMediaStream(enable); | |
60 enableNotifications(enable); | |
61 enablePeerConnection(enable); | |
62 enableQuota(enable); | |
63 enableScriptedSpeech(enable); | |
64 enableSessionStorage(enable); | |
65 enableSpeechInput(enable); | |
66 enableTouch(enable); | |
67 enableVideoTrack(enable); | |
68 enableWebAudio(enable); | |
69 } | 48 } |
70 | 49 |
71 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable) | 50 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable) |
72 { | 51 { |
73 enableCSSCompositing(enable); | 52 RuntimeEnabledFeatures::setExperimentalFeaturesEnabled(enable); |
74 enableCSSExclusions(enable); | |
75 enableCSSRegions(enable); | |
76 enableCustomDOMElements(enable); | |
77 enableDialogElement(enable); | |
78 enableExperimentalContentSecurityPolicyFeatures(enable); | |
79 enableFontLoadEvents(enable); | |
80 enableSeamlessIFrames(enable); | |
81 enableStyleScoped(enable); | |
82 } | 53 } |
83 | 54 |
84 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable) | 55 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable) |
85 { | 56 { |
86 // This method should be used by ContentShell | 57 RuntimeEnabledFeatures::setTestFeaturesEnabled(enable); |
87 // to enable features which should be enabled for | |
88 // the layout tests but are not yet "experimental". | |
89 enableCanvasPath(enable); | |
90 enableExperimentalCanvasFeatures(enable); | |
91 enableExperimentalShadowDOM(enable); | |
92 enableInputTypeDateTime(enable); | |
93 enableRequestAutocomplete(enable); | |
94 enableWebMIDI(enable); | |
95 } | 58 } |
96 | 59 |
97 void WebRuntimeFeatures::enableApplicationCache(bool enable) | 60 void WebRuntimeFeatures::enableApplicationCache(bool enable) |
98 { | 61 { |
99 RuntimeEnabledFeatures::setApplicationCacheEnabled(enable); | 62 RuntimeEnabledFeatures::setApplicationCacheEnabled(enable); |
100 } | 63 } |
101 | 64 |
102 bool WebRuntimeFeatures::isApplicationCacheEnabled() | 65 bool WebRuntimeFeatures::isApplicationCacheEnabled() |
103 { | 66 { |
104 return RuntimeEnabledFeatures::applicationCacheEnabled(); | 67 return RuntimeEnabledFeatures::applicationCacheEnabled(); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 { | 517 { |
555 RuntimeEnabledFeatures::setWebPInAcceptHeaderEnabled(enable); | 518 RuntimeEnabledFeatures::setWebPInAcceptHeaderEnabled(enable); |
556 } | 519 } |
557 | 520 |
558 bool WebRuntimeFeatures::isWebPInAcceptHeaderEnabled() | 521 bool WebRuntimeFeatures::isWebPInAcceptHeaderEnabled() |
559 { | 522 { |
560 return RuntimeEnabledFeatures::webPInAcceptHeaderEnabled(); | 523 return RuntimeEnabledFeatures::webPInAcceptHeaderEnabled(); |
561 } | 524 } |
562 | 525 |
563 } // namespace WebKit | 526 } // namespace WebKit |
OLD | NEW |