OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ | |
6 #define CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 | |
11 namespace content { | |
12 | |
13 class VibrationService { | |
14 public: | |
15 VibrationService() {} | |
16 virtual ~VibrationService() {} | |
17 | |
18 // Factory function for VibrationService. Returns an empty pointer if the | |
19 // service is not available. | |
20 static scoped_ptr<VibrationService> Create(); | |
21 | |
22 // Starts a vibration for the given duration. If there is currently an active | |
23 // vibration it will be cancelled before the new one is started. | |
24 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.
| |
25 | |
26 // Cancels the current vibration, if there is one. | |
27 virtual void CancelVibration() = 0; | |
28 | |
29 private: | |
30 DISALLOW_COPY_AND_ASSIGN(VibrationService); | |
31 }; | |
32 | |
33 } // namespace content | |
34 | |
35 #endif // CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ | |
OLD | NEW |