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

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: Vibration cannot be canceled during pattern vibration. 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
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 47c1dadc57fcefb9cafc053d5f267abbc9760ffe..6a18af252020abd40832a28c1488f5f565cff28e 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -101,6 +101,7 @@
#include "core/rendering/RenderTreeAsText.h"
#include "core/rendering/RenderView.h"
#include "core/workers/WorkerThread.h"
+#include "modules/vibration/NavigatorVibration.h"
abarth-chromium 2013/07/08 21:04:59 Technically this is a bad dependency. You should
haraken 2013/07/12 09:21:42 The right solution would be to add modules/vibrati
kihong 2013/07/17 02:19:16 I added FIXME here and nbarth@ going to implement
#include "weborigin/SchemeRegistry.h"
#include "wtf/dtoa.h"
#include "wtf/text/StringBuffer.h"
@@ -1993,4 +1994,12 @@ bool Internals::isSelectPopupVisible(Node* node)
return menuList->popupIsVisible();
}
+bool Internals::isVibrating()
+{
+ Document* document = contextDocument();
abarth-chromium 2013/07/08 21:04:59 It's better to pass in |document| explicitly.
kihong 2013/07/12 11:04:13 Done.
+ ASSERT(document && document->domWindow());
+
+ return NavigatorVibration::from(document->domWindow()->navigator())->isVibrating();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698