| OLD | NEW |
| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 bool ScreenOrientationControllerImpl::hasLastData() { | 208 bool ScreenOrientationControllerImpl::hasLastData() { |
| 209 return true; | 209 return true; |
| 210 } | 210 } |
| 211 | 211 |
| 212 void ScreenOrientationControllerImpl::contextDestroyed(ExecutionContext*) { | 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 | |
| 220 void ScreenOrientationControllerImpl::notifyDispatcher() { | 218 void ScreenOrientationControllerImpl::notifyDispatcher() { |
| 221 if (m_orientation && page()->isPageVisible()) | 219 if (m_orientation && page()->isPageVisible()) |
| 222 startUpdating(); | 220 startUpdating(); |
| 223 else | 221 else |
| 224 stopUpdating(); | 222 stopUpdating(); |
| 225 } | 223 } |
| 226 | 224 |
| 227 DEFINE_TRACE(ScreenOrientationControllerImpl) { | 225 DEFINE_TRACE(ScreenOrientationControllerImpl) { |
| 228 visitor->trace(m_orientation); | 226 visitor->trace(m_orientation); |
| 229 ContextLifecycleObserver::trace(visitor); | 227 ContextLifecycleObserver::trace(visitor); |
| 230 Supplement<LocalFrame>::trace(visitor); | 228 Supplement<LocalFrame>::trace(visitor); |
| 231 PlatformEventController::trace(visitor); | 229 PlatformEventController::trace(visitor); |
| 232 } | 230 } |
| 233 | 231 |
| 234 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |