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

Unified Diff: Source/modules/vibration/Vibration.h

Issue 15724023: Vibration API: use runtime flag, change from client to platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Delete unused code. 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
« no previous file with comments | « Source/modules/vibration/NavigatorVibration.idl ('k') | Source/modules/vibration/Vibration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/vibration/Vibration.h
diff --git a/Source/modules/vibration/Vibration.h b/Source/modules/vibration/Vibration.h
index 1514f15c89b5cea9743fa740080f2698b9add695..92bc1a4c43e4821acc7e24a1841bfa68a6ff92fe 100644
--- a/Source/modules/vibration/Vibration.h
+++ b/Source/modules/vibration/Vibration.h
@@ -20,25 +20,18 @@
#ifndef Vibration_h
#define Vibration_h
-#if ENABLE(VIBRATION)
-
#include "core/page/Page.h"
#include "core/platform/Timer.h"
#include "wtf/PassOwnPtr.h"
namespace WebCore {
-class VibrationClient;
-
class Vibration : public Supplement<Page> {
public:
typedef Vector<unsigned> VibrationPattern;
- explicit Vibration(VibrationClient*);
~Vibration();
- static PassOwnPtr<Vibration> create(VibrationClient*);
-
void vibrate(const unsigned& time);
void vibrate(const VibrationPattern&);
void cancelVibration();
@@ -50,11 +43,12 @@ public:
void timerStopFired(Timer<Vibration>*);
static const char* supplementName();
- static Vibration* from(Page* page) { return static_cast<Vibration*>(Supplement<Page>::from(page, supplementName())); }
+ static Vibration* from(Page*);
static bool isActive(Page*);
Peter Beverloo 2013/06/11 14:30:36 Sorry, two more nits I missed earlier on. isActiv
Michael van Ouwerkerk 2013/06/11 14:58:56 Done.
private:
- VibrationClient* m_vibrationClient;
+ Vibration();
+
Timer<Vibration> m_timerStart;
Timer<Vibration> m_timerStop;
bool m_isVibrating;
@@ -63,7 +57,4 @@ private:
} // namespace WebCore
-#endif // ENABLE(VIBRATION)
-
#endif // Vibration_h
-
« no previous file with comments | « Source/modules/vibration/NavigatorVibration.idl ('k') | Source/modules/vibration/Vibration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698