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 10 matching lines...) Expand all Loading... |
21 #include "modules/vibration/NavigatorVibration.h" | 21 #include "modules/vibration/NavigatorVibration.h" |
22 | 22 |
23 #include "core/frame/LocalFrame.h" | 23 #include "core/frame/LocalFrame.h" |
24 #include "core/frame/Navigator.h" | 24 #include "core/frame/Navigator.h" |
25 #include "core/page/PageVisibilityState.h" | 25 #include "core/page/PageVisibilityState.h" |
26 #include "public/platform/Platform.h" | 26 #include "public/platform/Platform.h" |
27 #include "public/platform/WebVibration.h" | 27 #include "public/platform/WebVibration.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 // Maximum number of entries in a vibration pattern. | |
32 const unsigned kVibrationPatternLengthMax = 99; | |
33 | |
34 NavigatorVibration::NavigatorVibration(Page& page) | 31 NavigatorVibration::NavigatorVibration(Page& page) |
35 : PageLifecycleObserver(&page) | 32 : PageLifecycleObserver(&page) |
36 , m_timerStart(this, &NavigatorVibration::timerStartFired) | 33 , m_timerStart(this, &NavigatorVibration::timerStartFired) |
37 , m_timerStop(this, &NavigatorVibration::timerStopFired) | 34 , m_timerStop(this, &NavigatorVibration::timerStopFired) |
38 , m_isVibrating(false) | 35 , m_isVibrating(false) |
39 { | 36 { |
40 } | 37 } |
41 | 38 |
42 NavigatorVibration::~NavigatorVibration() | 39 NavigatorVibration::~NavigatorVibration() |
43 { | 40 { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 return "NavigatorVibration"; | 170 return "NavigatorVibration"; |
174 } | 171 } |
175 | 172 |
176 DEFINE_TRACE(NavigatorVibration) | 173 DEFINE_TRACE(NavigatorVibration) |
177 { | 174 { |
178 WillBeHeapSupplement<Page>::trace(visitor); | 175 WillBeHeapSupplement<Page>::trace(visitor); |
179 PageLifecycleObserver::trace(visitor); | 176 PageLifecycleObserver::trace(visitor); |
180 } | 177 } |
181 | 178 |
182 } // namespace blink | 179 } // namespace blink |
OLD | NEW |