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

Unified Diff: Source/core/testing/Internals.cpp

Issue 18478003: Vibration cannot be canceled during pattern vibration. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 993203917604244749d8cb602f15a5d1b3a8ea8f..6e74ec4286f01b7b4454922acecf7da62b97a5c0 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -100,6 +100,7 @@
#include "core/rendering/RenderTreeAsText.h"
#include "core/rendering/RenderView.h"
#include "core/workers/WorkerThread.h"
+#include "modules/vibration/NavigatorVibration.h"
#include "weborigin/SchemeRegistry.h"
#include "wtf/dtoa.h"
#include "wtf/text/StringBuffer.h"
@@ -1973,4 +1974,13 @@ bool Internals::isSelectPopupVisible(Node* node)
return menuList->popupIsVisible();
}
+bool Internals::isVibrating()
+{
+ Document* document = contextDocument();
+ ASSERT(document && document->domWindow());
+
+ fprintf(stderr, "isVibrating()\n");
+ return NavigatorVibration::from(document->domWindow()->navigator())->isVibrating();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698