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

Unified Diff: device/vibration/vibration_manager_impl.h

Issue 583663003: Vibration API : migrate to device/vibration using mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and clean-up Created 6 years, 1 month 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: device/vibration/vibration_manager_impl.h
diff --git a/device/vibration/vibration_manager_impl.h b/device/vibration/vibration_manager_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..86cd9af30798de89e5c10703a7e57b2a40cd811f
--- /dev/null
+++ b/device/vibration/vibration_manager_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_
+#define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "device/vibration/vibration_export.h"
+#include "device/vibration/vibration_manager.mojom.h"
+
+namespace device {
+
+class VibrationProvider;
+
+class VibrationManagerImpl : public mojo::InterfaceImpl<VibrationManager> {
+ public:
+ DEVICE_VIBRATION_EXPORT static void Create(
+ mojo::InterfaceRequest<VibrationManager> request);
+
+ virtual void Vibrate(int64 millis) override;
Tom Sepez 2014/12/01 18:27:16 nit: ditto
timvolodine 2014/12/02 19:37:57 Done.
+ virtual void Cancel() override;
+
+ // Allows an embedder to set its own VibrationProvider implementation.
+ // NOTE: Apparently used by an external project; please don't remove.
+ // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more
Tom Sepez 2014/12/01 18:27:16 nit: someone else commented on this, I'm assuming
timvolodine 2014/12/02 19:37:57 Done.
+ // information.
+ static void SetOverrideVibrationProvider(VibrationProvider* provider);
+
+ private:
+ VibrationManagerImpl();
+ virtual ~VibrationManagerImpl();
+
+ static VibrationProvider* CreateProvider();
+
+ scoped_ptr<VibrationProvider> provider_;
+};
+
+} // namespace device
+
+#endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698