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

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

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: rebase Created 3 years, 8 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) 335 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI))
336 WebRuntimeFeatures::EnableMediaSession(false); 336 WebRuntimeFeatures::EnableMediaSession(false);
337 337
338 WebRuntimeFeatures::EnablePaymentRequest( 338 WebRuntimeFeatures::EnablePaymentRequest(
339 base::FeatureList::IsEnabled(features::kWebPayments)); 339 base::FeatureList::IsEnabled(features::kWebPayments));
340 #endif 340 #endif
341 341
342 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( 342 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload(
343 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); 343 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload));
344 344
345 WebRuntimeFeatures::EnableOffMainThreadFetch(
346 base::FeatureList::IsEnabled(features::kOffMainThreadFetch));
347
345 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) 348 if (base::FeatureList::IsEnabled(features::kGamepadExtensions))
346 WebRuntimeFeatures::EnableGamepadExtensions(true); 349 WebRuntimeFeatures::EnableGamepadExtensions(true);
347 350
348 if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition)) 351 if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition))
349 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition", 352 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition",
350 true); 353 true);
351 354
352 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) 355 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers))
353 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers", 356 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers",
354 false); 357 false);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 390 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
388 std::vector<std::string> disabled_features = base::SplitString( 391 std::vector<std::string> disabled_features = base::SplitString(
389 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 392 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
390 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 393 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
391 for (const std::string& feature : disabled_features) 394 for (const std::string& feature : disabled_features)
392 WebRuntimeFeatures::EnableFeatureFromString(feature, false); 395 WebRuntimeFeatures::EnableFeatureFromString(feature, false);
393 } 396 }
394 } 397 }
395 398
396 } // namespace content 399 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698