| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Samsung Electronics | 2 * Copyright (C) 2012 Samsung Electronics |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 WTF_MAKE_NONCOPYABLE(VibrationController); | 44 WTF_MAKE_NONCOPYABLE(VibrationController); |
| 45 public: | 45 public: |
| 46 using VibrationPattern = Vector<unsigned>; | 46 using VibrationPattern = Vector<unsigned>; |
| 47 | 47 |
| 48 explicit VibrationController(Document&); | 48 explicit VibrationController(Document&); |
| 49 virtual ~VibrationController(); | 49 virtual ~VibrationController(); |
| 50 | 50 |
| 51 static VibrationPattern sanitizeVibrationPattern(const UnsignedLongOrUnsigne
dLongSequence&); | 51 static VibrationPattern sanitizeVibrationPattern(const UnsignedLongOrUnsigne
dLongSequence&); |
| 52 | 52 |
| 53 bool vibrate(const VibrationPattern&); | 53 bool vibrate(const VibrationPattern&); |
| 54 void doVibrate(Timer<VibrationController>*); | 54 void doVibrate(TimerBase*); |
| 55 void didVibrate(); | 55 void didVibrate(); |
| 56 | 56 |
| 57 // Cancels the ongoing vibration if there is one. | 57 // Cancels the ongoing vibration if there is one. |
| 58 void cancel(); | 58 void cancel(); |
| 59 void didCancel(); | 59 void didCancel(); |
| 60 | 60 |
| 61 // Whether a pattern is being processed. If this is true, the vibration | 61 // Whether a pattern is being processed. If this is true, the vibration |
| 62 // hardware may currently be active, but during a pause it may be inactive. | 62 // hardware may currently be active, but during a pause it may be inactive. |
| 63 bool isRunning() const { return m_isRunning; } | 63 bool isRunning() const { return m_isRunning; } |
| 64 | 64 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 91 | 91 |
| 92 // Whether an async mojo call to vibrate is pending. | 92 // Whether an async mojo call to vibrate is pending. |
| 93 bool m_isCallingVibrate; | 93 bool m_isCallingVibrate; |
| 94 | 94 |
| 95 VibrationPattern m_pattern; | 95 VibrationPattern m_pattern; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif // VibrationController_h | 100 #endif // VibrationController_h |
| OLD | NEW |