| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 #include "base/android/build_info.h" | 24 #include "base/android/build_info.h" |
| 25 #include "media/base/android/media_codec_util.h" | 25 #include "media/base/android/media_codec_util.h" |
| 26 #endif | 26 #endif |
| 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 // EME implementation needs Android MediaCodec API. |
| 35 if (!media::MediaCodecUtil::IsMediaCodecAvailable()) { | 35 if (!media::MediaCodecUtil::IsMediaCodecAvailable()) { |
| 36 WebRuntimeFeatures::enableMediaSource(false); | |
| 37 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 36 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); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 199 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 201 std::vector<std::string> disabled_features = base::SplitString( | 200 std::vector<std::string> disabled_features = base::SplitString( |
| 202 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 201 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 203 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 202 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 204 for (const std::string& feature : disabled_features) | 203 for (const std::string& feature : disabled_features) |
| 205 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 204 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 206 } | 205 } |
| 207 } | 206 } |
| 208 | 207 |
| 209 } // namespace content | 208 } // namespace content |
| OLD | NEW |