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

Side by Side Diff: content/child/runtime_features.cc

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout tests. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 16 matching lines...) Expand all
27 27
28 using blink::WebRuntimeFeatures; 28 using blink::WebRuntimeFeatures;
29 29
30 namespace content { 30 namespace content {
31 31
32 static void SetRuntimeFeatureDefaultsForPlatform() { 32 static void SetRuntimeFeatureDefaultsForPlatform() {
33 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
34 // MSE/EME implementation needs Android MediaCodec API. 34 // MSE/EME implementation needs Android MediaCodec API.
35 if (!media::MediaCodecUtil::IsMediaCodecAvailable()) { 35 if (!media::MediaCodecUtil::IsMediaCodecAvailable()) {
36 WebRuntimeFeatures::enableMediaSource(false); 36 WebRuntimeFeatures::enableMediaSource(false);
37 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
38 WebRuntimeFeatures::enableEncryptedMedia(false); 37 WebRuntimeFeatures::enableEncryptedMedia(false);
39 } 38 }
40 39
41 // Android does not have support for PagePopup 40 // Android does not have support for PagePopup
42 WebRuntimeFeatures::enablePagePopup(false); 41 WebRuntimeFeatures::enablePagePopup(false);
43 // Android does not yet support SharedWorker. crbug.com/154571 42 // Android does not yet support SharedWorker. crbug.com/154571
44 WebRuntimeFeatures::enableSharedWorker(false); 43 WebRuntimeFeatures::enableSharedWorker(false);
45 // Android does not yet support NavigatorContentUtils. 44 // Android does not yet support NavigatorContentUtils.
46 WebRuntimeFeatures::enableNavigatorContentUtils(false); 45 WebRuntimeFeatures::enableNavigatorContentUtils(false);
47 WebRuntimeFeatures::enableOrientationEvent(true); 46 WebRuntimeFeatures::enableOrientationEvent(true);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 97
99 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) 98 if (command_line.HasSwitch(switches::kDisableSharedWorkers))
100 WebRuntimeFeatures::enableSharedWorker(false); 99 WebRuntimeFeatures::enableSharedWorker(false);
101 100
102 if (command_line.HasSwitch(switches::kDisableWebAudio)) 101 if (command_line.HasSwitch(switches::kDisableWebAudio))
103 WebRuntimeFeatures::enableWebAudio(false); 102 WebRuntimeFeatures::enableWebAudio(false);
104 103
105 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) 104 if (command_line.HasSwitch(switches::kDisableSpeechAPI))
106 WebRuntimeFeatures::enableScriptedSpeech(false); 105 WebRuntimeFeatures::enableScriptedSpeech(false);
107 106
108 if (command_line.HasSwitch(switches::kDisableEncryptedMedia))
109 WebRuntimeFeatures::enableEncryptedMedia(false);
110
111 if (command_line.HasSwitch(switches::kEnablePrefixedEncryptedMedia))
112 WebRuntimeFeatures::enablePrefixedEncryptedMedia(true);
113
114 if (command_line.HasSwitch(switches::kDisableFileSystem)) 107 if (command_line.HasSwitch(switches::kDisableFileSystem))
115 WebRuntimeFeatures::enableFileSystem(false); 108 WebRuntimeFeatures::enableFileSystem(false);
116 109
117 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) 110 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures))
118 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); 111 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true);
119 112
120 if (!command_line.HasSwitch(switches::kDisableAcceleratedJpegDecoding)) 113 if (!command_line.HasSwitch(switches::kDisableAcceleratedJpegDecoding))
121 WebRuntimeFeatures::enableDecodeToYUV(true); 114 WebRuntimeFeatures::enableDecodeToYUV(true);
122 115
123 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) 116 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas))
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 193 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
201 std::vector<std::string> disabled_features = base::SplitString( 194 std::vector<std::string> disabled_features = base::SplitString(
202 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 195 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
203 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 196 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
204 for (const std::string& feature : disabled_features) 197 for (const std::string& feature : disabled_features)
205 WebRuntimeFeatures::enableFeatureFromString(feature, false); 198 WebRuntimeFeatures::enableFeatureFromString(feature, false);
206 } 199 }
207 } 200 }
208 201
209 } // namespace content 202 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698