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

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

Issue 2651883008: Make content::FeaturePolicy implement WebFeaturePolicy, and use it in blink code (Closed)
Patch Set: Duplicate FP object rather than modifying in-place Created 3 years, 10 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 5c8c403dcdaf6ca11ff80d56ba709007b2c17c48..558b130470018db50354c48d03be9e24246d6a33 100644
--- a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
+++ b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
@@ -82,7 +82,8 @@ bool NavigatorVibration::vibrate(Navigator& navigator,
// 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() &&
- !isFeatureEnabledInFrame(blink::kVibrateFeature, frame)) {
+ !isFeatureEnabledInFrame(blink::WebFeaturePolicyFeature::Vibrate,
+ frame)) {
frame->domWindow()->printErrorMessage(
"Navigator.vibrate() is not enabled in feature policy for this "
"frame.");

Powered by Google App Engine
This is Rietveld 408576698