| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 196 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 198 std::vector<std::string> disabled_features = base::SplitString( | 197 std::vector<std::string> disabled_features = base::SplitString( |
| 199 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 198 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 200 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 199 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 201 for (const std::string& feature : disabled_features) | 200 for (const std::string& feature : disabled_features) |
| 202 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 201 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 203 } | 202 } |
| 204 } | 203 } |
| 205 | 204 |
| 206 } // namespace content | 205 } // namespace content |
| OLD | NEW |