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

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

Issue 20104005: enable MSE and legacy EME by default on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 years, 5 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 | Annotate | Revision Log
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 "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 #endif 13 #endif
14 14
15 using WebKit::WebRuntimeFeatures; 15 using WebKit::WebRuntimeFeatures;
16 16
17 namespace content { 17 namespace content {
18 18
19 static void SetRuntimeFeatureDefaultsForPlatform() { 19 static void SetRuntimeFeatureDefaultsForPlatform() {
20 #if defined(OS_ANDROID) && !defined(GOOGLE_TV)
21 WebRuntimeFeatures::enableWebKitMediaSource(false);
22 WebRuntimeFeatures::enableLegacyEncryptedMedia(false);
23 WebRuntimeFeatures::enableEncryptedMedia(false);
24 #endif
25
26 #if defined(OS_ANDROID) 20 #if defined(OS_ANDROID)
27 bool enable_webaudio = false; 21 bool enable_webaudio = false;
28 #if defined(ARCH_CPU_ARMEL) 22 #if defined(ARCH_CPU_ARMEL)
29 enable_webaudio = 23 enable_webaudio =
30 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); 24 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0);
31 #endif 25 #endif
32 WebRuntimeFeatures::enableWebAudio(enable_webaudio); 26 WebRuntimeFeatures::enableWebAudio(enable_webaudio);
33 // Android does not support the Gamepad API. 27 // Android does not support the Gamepad API.
34 WebRuntimeFeatures::enableGamepad(false); 28 WebRuntimeFeatures::enableGamepad(false);
35 // Android does not have support for PagePopup 29 // Android does not have support for PagePopup
(...skipping 23 matching lines...) Expand all
59 53
60 if (command_line.HasSwitch(switches::kDisableLocalStorage)) 54 if (command_line.HasSwitch(switches::kDisableLocalStorage))
61 WebRuntimeFeatures::enableLocalStorage(false); 55 WebRuntimeFeatures::enableLocalStorage(false);
62 56
63 if (command_line.HasSwitch(switches::kDisableSessionStorage)) 57 if (command_line.HasSwitch(switches::kDisableSessionStorage))
64 WebRuntimeFeatures::enableSessionStorage(false); 58 WebRuntimeFeatures::enableSessionStorage(false);
65 59
66 if (command_line.HasSwitch(switches::kDisableGeolocation)) 60 if (command_line.HasSwitch(switches::kDisableGeolocation))
67 WebRuntimeFeatures::enableGeolocation(false); 61 WebRuntimeFeatures::enableGeolocation(false);
68 62
69 #if defined(OS_ANDROID) && !defined(GOOGLE_TV)
70 if (command_line.HasSwitch(switches::kEnableWebKitMediaSource))
71 WebRuntimeFeatures::enableWebKitMediaSource(true);
72 #else
73 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource)) 63 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource))
74 WebRuntimeFeatures::enableWebKitMediaSource(false); 64 WebRuntimeFeatures::enableWebKitMediaSource(false);
75 #endif
76 65
77 #if defined(OS_ANDROID) 66 #if defined(OS_ANDROID)
78 if (command_line.HasSwitch(switches::kDisableWebRTC)) { 67 if (command_line.HasSwitch(switches::kDisableWebRTC)) {
79 WebRuntimeFeatures::enableMediaStream(false); 68 WebRuntimeFeatures::enableMediaStream(false);
80 WebRuntimeFeatures::enablePeerConnection(false); 69 WebRuntimeFeatures::enablePeerConnection(false);
81 } 70 }
82 71
83 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) 72 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition))
84 WebRuntimeFeatures::enableScriptedSpeech(false); 73 WebRuntimeFeatures::enableScriptedSpeech(false);
85 #endif 74 #endif
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); 110 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true);
122 111
123 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis)) 112 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis))
124 WebRuntimeFeatures::enableSpeechSynthesis(true); 113 WebRuntimeFeatures::enableSpeechSynthesis(true);
125 114
126 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) 115 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions))
127 WebRuntimeFeatures::enableWebGLDraftExtensions(true); 116 WebRuntimeFeatures::enableWebGLDraftExtensions(true);
128 } 117 }
129 118
130 } // namespace content 119 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698