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

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

Issue 2613133003: Disable MediaSession API for WebView (Closed)
Patch Set: rebased Created 3 years, 11 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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 297 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
298 298
299 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( 299 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames(
300 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); 300 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames));
301 301
302 if (base::FeatureList::IsEnabled( 302 if (base::FeatureList::IsEnabled(
303 features::kSendBeaconThrowForBlobWithNonSimpleType)) 303 features::kSendBeaconThrowForBlobWithNonSimpleType))
304 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); 304 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true);
305 305
306 #if defined(OS_ANDROID) 306 #if defined(OS_ANDROID)
307 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI))
308 WebRuntimeFeatures::enableMediaSession(false);
309
307 WebRuntimeFeatures::enablePaymentRequest( 310 WebRuntimeFeatures::enablePaymentRequest(
308 base::FeatureList::IsEnabled(features::kWebPayments)); 311 base::FeatureList::IsEnabled(features::kWebPayments));
309 #endif 312 #endif
310 313
311 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) 314 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload))
312 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); 315 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true);
313 316
314 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) 317 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker))
315 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); 318 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true);
316 319
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 352 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
350 std::vector<std::string> disabled_features = base::SplitString( 353 std::vector<std::string> disabled_features = base::SplitString(
351 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 354 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
352 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 355 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
353 for (const std::string& feature : disabled_features) 356 for (const std::string& feature : disabled_features)
354 WebRuntimeFeatures::enableFeatureFromString(feature, false); 357 WebRuntimeFeatures::enableFeatureFromString(feature, false);
355 } 358 }
356 } 359 }
357 360
358 } // namespace content 361 } // 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