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

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

Issue 914373003: Exceptions for Web Notifications and the Push API by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the AndroidWebViewTest assert Created 5 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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 30 matching lines...) Expand all
41 AndroidCpuFamily cpu_family = android_getCpuFamily(); 41 AndroidCpuFamily cpu_family = android_getCpuFamily();
42 WebRuntimeFeatures::enableWebAudio( 42 WebRuntimeFeatures::enableWebAudio(
43 media::MediaCodecBridge::IsAvailable() && 43 media::MediaCodecBridge::IsAvailable() &&
44 ((cpu_family == ANDROID_CPU_FAMILY_ARM) || 44 ((cpu_family == ANDROID_CPU_FAMILY_ARM) ||
45 (cpu_family == ANDROID_CPU_FAMILY_ARM64) || 45 (cpu_family == ANDROID_CPU_FAMILY_ARM64) ||
46 (cpu_family == ANDROID_CPU_FAMILY_X86) || 46 (cpu_family == ANDROID_CPU_FAMILY_X86) ||
47 (cpu_family == ANDROID_CPU_FAMILY_MIPS))); 47 (cpu_family == ANDROID_CPU_FAMILY_MIPS)));
48 48
49 // Android does not have support for PagePopup 49 // Android does not have support for PagePopup
50 WebRuntimeFeatures::enablePagePopup(false); 50 WebRuntimeFeatures::enablePagePopup(false);
51 // Android does not yet support the Web Notification API. crbug.com/115320
52 WebRuntimeFeatures::enableNotifications(false);
53 // Android does not yet support SharedWorker. crbug.com/154571 51 // Android does not yet support SharedWorker. crbug.com/154571
54 WebRuntimeFeatures::enableSharedWorker(false); 52 WebRuntimeFeatures::enableSharedWorker(false);
55 // Android does not yet support NavigatorContentUtils. 53 // Android does not yet support NavigatorContentUtils.
56 WebRuntimeFeatures::enableNavigatorContentUtils(false); 54 WebRuntimeFeatures::enableNavigatorContentUtils(false);
57 WebRuntimeFeatures::enableTouchIconLoading(true); 55 WebRuntimeFeatures::enableTouchIconLoading(true);
58 WebRuntimeFeatures::enableOrientationEvent(true); 56 WebRuntimeFeatures::enableOrientationEvent(true);
59 WebRuntimeFeatures::enableFastMobileScrolling(true); 57 WebRuntimeFeatures::enableFastMobileScrolling(true);
60 WebRuntimeFeatures::enableMediaCapture(true); 58 WebRuntimeFeatures::enableMediaCapture(true);
61 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); 59 WebRuntimeFeatures::enableCompositedSelectionUpdate(true);
62 // If navigation transitions gets activated via field trial, enable it in 60 // If navigation transitions gets activated via field trial, enable it in
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 96
99 if (command_line.HasSwitch(switches::kDisableBlinkScheduler)) 97 if (command_line.HasSwitch(switches::kDisableBlinkScheduler))
100 WebRuntimeFeatures::enableBlinkScheduler(false); 98 WebRuntimeFeatures::enableBlinkScheduler(false);
101 99
102 if (command_line.HasSwitch(switches::kDisableLocalStorage)) 100 if (command_line.HasSwitch(switches::kDisableLocalStorage))
103 WebRuntimeFeatures::enableLocalStorage(false); 101 WebRuntimeFeatures::enableLocalStorage(false);
104 102
105 if (command_line.HasSwitch(switches::kDisableMediaSource)) 103 if (command_line.HasSwitch(switches::kDisableMediaSource))
106 WebRuntimeFeatures::enableMediaSource(false); 104 WebRuntimeFeatures::enableMediaSource(false);
107 105
106 if (command_line.HasSwitch(switches::kDisableNotifications)) {
107 WebRuntimeFeatures::enableNotifications(false);
108
109 // Chrome's Push Messaging implementation relies on Web Notifications.
110 WebRuntimeFeatures::enablePushMessaging(false);
111 }
112
108 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) 113 if (command_line.HasSwitch(switches::kDisableSharedWorkers))
109 WebRuntimeFeatures::enableSharedWorker(false); 114 WebRuntimeFeatures::enableSharedWorker(false);
110 115
111 #if defined(OS_ANDROID) 116 #if defined(OS_ANDROID)
112 if (command_line.HasSwitch(switches::kDisableWebRTC)) 117 if (command_line.HasSwitch(switches::kDisableWebRTC))
113 WebRuntimeFeatures::enablePeerConnection(false); 118 WebRuntimeFeatures::enablePeerConnection(false);
114 119
115 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures))
116 WebRuntimeFeatures::enableNotifications(true);
117
118 // WebAudio is enabled by default on ARM and X86, if the MediaCodec 120 // WebAudio is enabled by default on ARM and X86, if the MediaCodec
119 // API is available. 121 // API is available.
120 WebRuntimeFeatures::enableWebAudio( 122 WebRuntimeFeatures::enableWebAudio(
121 !command_line.HasSwitch(switches::kDisableWebAudio) && 123 !command_line.HasSwitch(switches::kDisableWebAudio) &&
122 media::MediaCodecBridge::IsAvailable()); 124 media::MediaCodecBridge::IsAvailable());
123 #else 125 #else
124 if (command_line.HasSwitch(switches::kDisableWebAudio)) 126 if (command_line.HasSwitch(switches::kDisableWebAudio))
125 WebRuntimeFeatures::enableWebAudio(false); 127 WebRuntimeFeatures::enableWebAudio(false);
126 #endif 128 #endif
127 129
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 217 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
216 &disabled_features); 218 &disabled_features);
217 for (const std::string& feature : disabled_features) { 219 for (const std::string& feature : disabled_features) {
218 WebRuntimeFeatures::enableFeatureFromString( 220 WebRuntimeFeatures::enableFeatureFromString(
219 blink::WebString::fromLatin1(feature), false); 221 blink::WebString::fromLatin1(feature), false);
220 } 222 }
221 } 223 }
222 } 224 }
223 225
224 } // namespace content 226 } // 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