summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/vibration/NavigatorVibration.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/Modules/vibration/NavigatorVibration.h')
-rw-r--r--Source/WebCore/Modules/vibration/NavigatorVibration.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/Source/WebCore/Modules/vibration/NavigatorVibration.h b/Source/WebCore/Modules/vibration/NavigatorVibration.h
new file mode 100644
index 000000000..3d4ffdc3a
--- /dev/null
+++ b/Source/WebCore/Modules/vibration/NavigatorVibration.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#if ENABLE(VIBRATION)
+
+#include "ExceptionCode.h"
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class Navigator;
+
+class NavigatorVibration {
+public:
+ typedef Vector<unsigned> VibrationPattern;
+
+ ~NavigatorVibration();
+
+ static bool vibrate(Navigator&, unsigned time);
+ static bool vibrate(Navigator&, const VibrationPattern&);
+
+private:
+ NavigatorVibration();
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(VIBRATION)