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

Side by Side Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/screen_orientation/ScreenOrientationControllerImpl.h" 5 #include "modules/screen_orientation/ScreenOrientationControllerImpl.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 203
204 void ScreenOrientationControllerImpl::unregisterWithDispatcher() { 204 void ScreenOrientationControllerImpl::unregisterWithDispatcher() {
205 ScreenOrientationDispatcher::instance().removeController(this); 205 ScreenOrientationDispatcher::instance().removeController(this);
206 } 206 }
207 207
208 bool ScreenOrientationControllerImpl::hasLastData() { 208 bool ScreenOrientationControllerImpl::hasLastData() {
209 return true; 209 return true;
210 } 210 }
211 211
212 void ScreenOrientationControllerImpl::contextDestroyed() { 212 void ScreenOrientationControllerImpl::contextDestroyed(ExecutionContext*) {
213 stopUpdating(); 213 stopUpdating();
214 m_client = nullptr; 214 m_client = nullptr;
215 m_activeLock = false; 215 m_activeLock = false;
216 } 216 }
217 217
218 void ScreenOrientationControllerImpl::contextDestroyed(Page*) {}
219
218 void ScreenOrientationControllerImpl::notifyDispatcher() { 220 void ScreenOrientationControllerImpl::notifyDispatcher() {
219 if (m_orientation && page()->isPageVisible()) 221 if (m_orientation && page()->isPageVisible())
220 startUpdating(); 222 startUpdating();
221 else 223 else
222 stopUpdating(); 224 stopUpdating();
223 } 225 }
224 226
225 DEFINE_TRACE(ScreenOrientationControllerImpl) { 227 DEFINE_TRACE(ScreenOrientationControllerImpl) {
226 visitor->trace(m_orientation); 228 visitor->trace(m_orientation);
227 ContextLifecycleObserver::trace(visitor); 229 ContextLifecycleObserver::trace(visitor);
228 Supplement<LocalFrame>::trace(visitor); 230 Supplement<LocalFrame>::trace(visitor);
229 PlatformEventController::trace(visitor); 231 PlatformEventController::trace(visitor);
230 } 232 }
231 233
232 } // namespace blink 234 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698