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

Unified Diff: third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp

Issue 2873433002: Enable Feature Policy without experimental features or fullscreen (Closed)
Patch Set: Fix test failure (fullscreen is still behind FeaturePolicy flag and only disabled in-place of IsSup… Created 3 years, 7 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
Index: third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
diff --git a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
index 03212573977cf1b49a4e2fd9d72c953512778c00..2307f8eaaa79f4ef3121bbdd8ba6b8697a2aa88f 100644
--- a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
+++ b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
@@ -31,6 +31,7 @@
#include "modules/vibration/VibrationController.h"
#include "platform/Histogram.h"
#include "platform/UserGestureIndicator.h"
+#include "platform/feature_policy/FeaturePolicy.h"
#include "public/platform/site_engagement.mojom-blink.h"
namespace blink {
@@ -81,10 +82,7 @@ bool NavigatorVibration::vibrate(Navigator& navigator,
if (!frame->GetPage()->IsPageVisible())
return false;
- // TODO(lunalu): When FeaturePolicy is ready, take out the check for the
- // runtime flag. Please pay attention to the user gesture code below.
- if (RuntimeEnabledFeatures::featurePolicyEnabled() &&
- RuntimeEnabledFeatures::featurePolicyExperimentalFeaturesEnabled() &&
+ if (IsSupportedInFeaturePolicy(blink::WebFeaturePolicyFeature::kVibrate) &&
!frame->IsFeatureEnabled(blink::WebFeaturePolicyFeature::kVibrate)) {
frame->DomWindow()->PrintErrorMessage(
"Navigator.vibrate() is not enabled in feature policy for this "

Powered by Google App Engine
This is Rietveld 408576698