Chromium Code Reviews| Index: content/browser/vibration/vibration_service.h |
| diff --git a/content/browser/vibration/vibration_service.h b/content/browser/vibration/vibration_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f87ffc9339fff30bea8edb28f436f71a6982246 |
| --- /dev/null |
| +++ b/content/browser/vibration/vibration_service.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2013 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 CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ |
| +#define CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace content { |
| + |
| +class VibrationService { |
| + public: |
| + VibrationService() {} |
| + virtual ~VibrationService() {} |
| + |
| + // Factory function for VibrationService. Returns an empty pointer if the |
| + // service is not available. |
| + static scoped_ptr<VibrationService> Create(); |
| + |
| + // Starts a vibration for the given duration. If there is currently an active |
| + // vibration it will be cancelled before the new one is started. |
| + virtual void Vibrate(unsigned int milliseconds) = 0; |
|
palmer
2013/06/21 18:17:40
int64_t
Michael van Ouwerkerk
2013/06/24 13:46:57
Done.
|
| + |
| + // Cancels the current vibration, if there is one. |
| + virtual void CancelVibration() = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(VibrationService); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ |