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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
10 | 10 |
11 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
12 #include <cpu-features.h> | 12 #include <cpu-features.h> |
13 #include "media/base/android/media_codec_bridge.h" | 13 #include "media/base/android/media_codec_bridge.h" |
14 #endif | 14 #endif |
15 | 15 |
16 using WebKit::WebRuntimeFeatures; | 16 using blink::WebRuntimeFeatures; |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 static void SetRuntimeFeatureDefaultsForPlatform() { | 20 static void SetRuntimeFeatureDefaultsForPlatform() { |
21 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
22 #if !defined(GOOGLE_TV) | 22 #if !defined(GOOGLE_TV) |
23 // MSE/EME implementation needs Android MediaCodec API. | 23 // MSE/EME implementation needs Android MediaCodec API. |
24 if (!media::MediaCodecBridge::IsAvailable()) { | 24 if (!media::MediaCodecBridge::IsAvailable()) { |
25 WebRuntimeFeatures::enableWebKitMediaSource(false); | 25 WebRuntimeFeatures::enableWebKitMediaSource(false); |
26 WebRuntimeFeatures::enableMediaSource(false); | 26 WebRuntimeFeatures::enableMediaSource(false); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 WebRuntimeFeatures::enableInputModeAttribute(true); | 153 WebRuntimeFeatures::enableInputModeAttribute(true); |
154 | 154 |
155 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) | 155 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) |
156 WebRuntimeFeatures::enableFastTextAutosizing(true); | 156 WebRuntimeFeatures::enableFastTextAutosizing(true); |
157 | 157 |
158 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) | 158 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) |
159 WebRuntimeFeatures::enableRepaintAfterLayout(true); | 159 WebRuntimeFeatures::enableRepaintAfterLayout(true); |
160 } | 160 } |
161 | 161 |
162 } // namespace content | 162 } // namespace content |
OLD | NEW |