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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 m_timerDoVibrate.startOneShot(0, BLINK_FROM_HERE); | 171 m_timerDoVibrate.startOneShot(0, BLINK_FROM_HERE); |
172 } | 172 } |
173 | 173 |
174 void VibrationController::contextDestroyed(ExecutionContext*) { | 174 void VibrationController::contextDestroyed(ExecutionContext*) { |
175 cancel(); | 175 cancel(); |
176 | 176 |
177 // If the document context was destroyed, never call the mojo service again. | 177 // If the document context was destroyed, never call the mojo service again. |
178 m_service.reset(); | 178 m_service.reset(); |
179 } | 179 } |
180 | 180 |
181 void VibrationController::contextDestroyed(Page*) {} | |
182 | |
183 void VibrationController::pageVisibilityChanged() { | 181 void VibrationController::pageVisibilityChanged() { |
184 if (!page()->isPageVisible()) | 182 if (!page()->isPageVisible()) |
185 cancel(); | 183 cancel(); |
186 } | 184 } |
187 | 185 |
188 DEFINE_TRACE(VibrationController) { | 186 DEFINE_TRACE(VibrationController) { |
189 ContextLifecycleObserver::trace(visitor); | 187 ContextLifecycleObserver::trace(visitor); |
190 PageVisibilityObserver::trace(visitor); | 188 PageVisibilityObserver::trace(visitor); |
191 } | 189 } |
192 | 190 |
193 } // namespace blink | 191 } // namespace blink |
OLD | NEW |