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

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

Issue 2584453005: Add stopUpdating to ScreenOrientationControllerImpl::frameDestroyed() (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/events/Event.h" 7 #include "core/events/Event.h"
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 void ScreenOrientationControllerImpl::unregisterWithDispatcher() { 203 void ScreenOrientationControllerImpl::unregisterWithDispatcher() {
204 ScreenOrientationDispatcher::instance().removeController(this); 204 ScreenOrientationDispatcher::instance().removeController(this);
205 } 205 }
206 206
207 bool ScreenOrientationControllerImpl::hasLastData() { 207 bool ScreenOrientationControllerImpl::hasLastData() {
208 return true; 208 return true;
209 } 209 }
210 210
211 void ScreenOrientationControllerImpl::frameDestroyed() { 211 void ScreenOrientationControllerImpl::frameDestroyed() {
212 stopUpdating();
212 m_client = nullptr; 213 m_client = nullptr;
213 DOMWindowProperty::frameDestroyed(); 214 DOMWindowProperty::frameDestroyed();
214 m_activeLock = false; 215 m_activeLock = false;
215 } 216 }
216 217
217 void ScreenOrientationControllerImpl::notifyDispatcher() { 218 void ScreenOrientationControllerImpl::notifyDispatcher() {
218 if (m_orientation && page()->isPageVisible()) 219 if (m_orientation && page()->isPageVisible())
219 startUpdating(); 220 startUpdating();
220 else 221 else
221 stopUpdating(); 222 stopUpdating();
222 } 223 }
223 224
224 DEFINE_TRACE(ScreenOrientationControllerImpl) { 225 DEFINE_TRACE(ScreenOrientationControllerImpl) {
225 visitor->trace(m_orientation); 226 visitor->trace(m_orientation);
226 DOMWindowProperty::trace(visitor); 227 DOMWindowProperty::trace(visitor);
227 Supplement<LocalFrame>::trace(visitor); 228 Supplement<LocalFrame>::trace(visitor);
228 PlatformEventController::trace(visitor); 229 PlatformEventController::trace(visitor);
229 } 230 }
230 231
231 } // namespace blink 232 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698