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

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

Issue 19041004: Move max vibration duration constant to platform so content/ can read it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 | public/platform/WebVibration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/vibration/NavigatorVibration.cpp
diff --git a/Source/modules/vibration/NavigatorVibration.cpp b/Source/modules/vibration/NavigatorVibration.cpp
index 194b2593818eb008b1ce4ac0d3818c0012944800..a397bb1a448ce25da88b4e163f9ddc9506762446 100644
--- a/Source/modules/vibration/NavigatorVibration.cpp
+++ b/Source/modules/vibration/NavigatorVibration.cpp
@@ -23,12 +23,10 @@
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebVibration.h"
namespace WebCore {
-// Maximum duration of a vibration is 10 seconds.
-const unsigned kVibrationDurationMax = 10000;
-
// Maximum number of entries in a vibration pattern.
const unsigned kVibrationPatternLengthMax = 99;
@@ -55,7 +53,7 @@ bool NavigatorVibration::vibrate(const VibrationPattern& pattern)
// If any pattern entry is too long then abort.
for (size_t i = 0; i < length; ++i) {
- if (pattern[i] > kVibrationDurationMax)
+ if (pattern[i] > WebKit::kVibrationDurationMax)
return false;
}
« no previous file with comments | « no previous file | public/platform/WebVibration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698