Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/modules/vibration/VibrationController.cpp

Issue 2634713002: Remove PageVisibilityObserver contextDestroyed() notifications. (Closed)
Patch Set: prefer type aliases Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698