OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_ |
| 6 #define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "device/vibration/vibration_export.h" |
| 11 #include "device/vibration/vibration_manager.mojom.h" |
| 12 |
| 13 namespace device { |
| 14 |
| 15 class VibrationProvider; |
| 16 |
| 17 class VibrationManagerImpl : public mojo::InterfaceImpl<VibrationManager> { |
| 18 public: |
| 19 DEVICE_VIBRATION_EXPORT static void Create( |
| 20 mojo::InterfaceRequest<VibrationManager> request); |
| 21 |
| 22 virtual void Vibrate(int64 millis) OVERRIDE; |
| 23 virtual void Cancel() OVERRIDE; |
| 24 |
| 25 // Allows an embedder to set its own VibrationProvider implementation. |
| 26 // NOTE: Apparently used by an external project; please don't remove. |
| 27 // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more |
| 28 // information. |
| 29 static void SetOverrideVibrationProvider(VibrationProvider* provider); |
| 30 |
| 31 private: |
| 32 VibrationManagerImpl(); |
| 33 virtual ~VibrationManagerImpl(); |
| 34 |
| 35 static VibrationProvider* CreateProvider(); |
| 36 |
| 37 scoped_ptr<VibrationProvider> provider_; |
| 38 }; |
| 39 |
| 40 } // namespace device |
| 41 |
| 42 #endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_H_ |
OLD | NEW |