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

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

Issue 19641006: Cancel vibration when frame load is committed. (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 | « Source/modules/vibration/NavigatorVibration.h ('k') | no next file » | 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 05ff456debd2367b505d37ca5edcd887586c4229..bba89fcadf195bece96040d44363d7013086ccc3 100644
--- a/Source/modules/vibration/NavigatorVibration.cpp
+++ b/Source/modules/vibration/NavigatorVibration.cpp
@@ -128,6 +128,13 @@ void NavigatorVibration::pageVisibilityChanged()
cancelVibration();
}
+void NavigatorVibration::didCommitLoad(Frame* frame)
+{
+ // A new load has been committed, which means the current page will be
+ // unloaded. Cancel all running vibrations.
+ cancelVibration();
+}
+
bool NavigatorVibration::vibrate(Navigator* navigator, unsigned time)
{
VibrationPattern pattern;
« no previous file with comments | « Source/modules/vibration/NavigatorVibration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698