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

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: 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/modules/vibration/Vibration.h
diff --git a/Source/modules/vibration/Vibration.h b/Source/modules/vibration/Vibration.h
index 1514f15c89b5cea9743fa740080f2698b9add695..28129ff0c0e36307eb4c6114e248c89905e2a0c7 100644
--- a/Source/modules/vibration/Vibration.h
+++ b/Source/modules/vibration/Vibration.h
@@ -20,24 +20,19 @@
#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*);
+ static PassOwnPtr<Vibration> create();
void vibrate(const unsigned& time);
void vibrate(const VibrationPattern&);
@@ -54,16 +49,15 @@ public:
static bool isActive(Page*);
private:
- VibrationClient* m_vibrationClient;
+ Vibration();
Timer<Vibration> m_timerStart;
Timer<Vibration> m_timerStop;
bool m_isVibrating;
VibrationPattern m_pattern;
};
-} // namespace WebCore
+void provideVibrationTo(Page*);
Peter Beverloo 2013/06/11 10:19:10 Since we already have three methods related to sup
Michael van Ouwerkerk 2013/06/11 13:26:51 Much nicer. Done.
-#endif // ENABLE(VIBRATION)
+} // namespace WebCore
#endif // Vibration_h
-

Powered by Google App Engine
This is Rietveld 408576698