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

Unified Diff: content/child/runtime_features.cc

Issue 389583004: Navigation transitions: Add finch trial for navigation transitions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index bcdc8c72e732422de7578ed4b4075c45e91ea5bf..99598aec1ef2e291b0b861ac6aaadb98db26c5c8 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -13,6 +13,7 @@
#if defined(OS_ANDROID)
#include <cpu-features.h>
#include "base/android/build_info.h"
+#include "base/metrics/field_trial.h"
#include "media/base/android/media_codec_bridge.h"
#endif
@@ -53,6 +54,11 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
WebRuntimeFeatures::enableOrientationEvent(true);
WebRuntimeFeatures::enableFastMobileScrolling(true);
WebRuntimeFeatures::enableMediaCapture(true);
+ // If navigation transitions gets activated via field trial, enable it in
+ // blink. We don't set this to false in case the user has manually enabled
+ // the feature via experimental web platform features.
+ if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled")
+ WebRuntimeFeatures::enableNavigationTransitions(true);
#else
WebRuntimeFeatures::enableNavigatorContentUtils(true);
#endif // defined(OS_ANDROID)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698