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 namespace content { | |
9 | |
10 class VibrationService { | |
11 public: | |
12 virtual ~VibrationService() {} | |
13 | |
14 // Factory function for VibrationService. Returns NULL if the service is not | |
15 // available. | |
16 static VibrationService* Create(); | |
17 | |
18 // Starts a vibration for the given duration. If there is currently an active | |
19 // vibration it will be cancelled before the new one is started. | |
20 virtual void Vibrate(unsigned milliseconds) = 0; | |
21 | |
22 // Cancels the current vibration, if there is one. | |
23 virtual void CancelVibration() = 0; | |
bulach
2013/06/20 14:21:04
nit:
private:
DISALLOW_COPY_AND_ASSIGN(Vibratio
Michael van Ouwerkerk
2013/06/20 17:34:09
How is this to be used on interfaces like this? I
bulach
2013/06/20 18:11:47
I guess it requires a default constructor, right a
Michael van Ouwerkerk
2013/06/21 09:53:38
Done.
| |
24 }; | |
25 | |
26 } // namespace content | |
27 | |
28 #endif // CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_H_ | |
OLD | NEW |