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

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

Issue 40303002: Simplify SharedWorkerRepository code (Chromium side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 1 month 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
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 26 matching lines...) Expand all
37 #endif // defined(ARCH_CPU_ARMEL) 37 #endif // defined(ARCH_CPU_ARMEL)
38 WebRuntimeFeatures::enableWebAudio(enable_webaudio); 38 WebRuntimeFeatures::enableWebAudio(enable_webaudio);
39 // Android does not support the Gamepad API. 39 // Android does not support the Gamepad API.
40 WebRuntimeFeatures::enableGamepad(false); 40 WebRuntimeFeatures::enableGamepad(false);
41 // Android does not have support for PagePopup 41 // Android does not have support for PagePopup
42 WebRuntimeFeatures::enablePagePopup(false); 42 WebRuntimeFeatures::enablePagePopup(false);
43 // datalist on Android is not enabled 43 // datalist on Android is not enabled
44 WebRuntimeFeatures::enableDataListElement(false); 44 WebRuntimeFeatures::enableDataListElement(false);
45 // Android does not yet support the Web Notification API. crbug.com/115320 45 // Android does not yet support the Web Notification API. crbug.com/115320
46 WebRuntimeFeatures::enableNotifications(false); 46 WebRuntimeFeatures::enableNotifications(false);
47 // Android does not yet support SharedWorker. crbug.com/154571
48 WebRuntimeFeatures::enableSharedWorker(false);
47 #endif // defined(OS_ANDROID) 49 #endif // defined(OS_ANDROID)
48 } 50 }
49 51
50 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( 52 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
51 const CommandLine& command_line) { 53 const CommandLine& command_line) {
52 WebRuntimeFeatures::enableStableFeatures(true); 54 WebRuntimeFeatures::enableStableFeatures(true);
53 55
54 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) 56 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures))
55 WebRuntimeFeatures::enableExperimentalFeatures(true); 57 WebRuntimeFeatures::enableExperimentalFeatures(true);
56 58
(...skipping 16 matching lines...) Expand all
73 75
74 if (command_line.HasSwitch(switches::kDisableGeolocation)) 76 if (command_line.HasSwitch(switches::kDisableGeolocation))
75 WebRuntimeFeatures::enableGeolocation(false); 77 WebRuntimeFeatures::enableGeolocation(false);
76 78
77 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource)) 79 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource))
78 WebRuntimeFeatures::enableWebKitMediaSource(false); 80 WebRuntimeFeatures::enableWebKitMediaSource(false);
79 81
80 if (command_line.HasSwitch(switches::kDisableUnprefixedMediaSource)) 82 if (command_line.HasSwitch(switches::kDisableUnprefixedMediaSource))
81 WebRuntimeFeatures::enableMediaSource(false); 83 WebRuntimeFeatures::enableMediaSource(false);
82 84
85 if (command_line.HasSwitch(switches::kDisableSharedWorkers))
86 WebRuntimeFeatures::enableSharedWorker(false);
87
83 #if defined(OS_ANDROID) 88 #if defined(OS_ANDROID)
84 if (command_line.HasSwitch(switches::kDisableWebRTC)) { 89 if (command_line.HasSwitch(switches::kDisableWebRTC)) {
85 WebRuntimeFeatures::enableMediaStream(false); 90 WebRuntimeFeatures::enableMediaStream(false);
86 WebRuntimeFeatures::enablePeerConnection(false); 91 WebRuntimeFeatures::enablePeerConnection(false);
87 } 92 }
88 93
89 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) 94 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition))
90 WebRuntimeFeatures::enableScriptedSpeech(false); 95 WebRuntimeFeatures::enableScriptedSpeech(false);
91 #endif 96 #endif
92 97
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 WebRuntimeFeatures::enableOverlayScrollbars(true); 150 WebRuntimeFeatures::enableOverlayScrollbars(true);
146 151
147 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) 152 if (command_line.HasSwitch(switches::kEnableInputModeAttribute))
148 WebRuntimeFeatures::enableInputModeAttribute(true); 153 WebRuntimeFeatures::enableInputModeAttribute(true);
149 154
150 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) 155 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing))
151 WebRuntimeFeatures::enableFastTextAutosizing(true); 156 WebRuntimeFeatures::enableFastTextAutosizing(true);
152 } 157 }
153 158
154 } // namespace content 159 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698