| 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/ScreenOrientationController.h" | 5 #include "modules/screen_orientation/ScreenOrientationController.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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool ScreenOrientationController::hasLastData() | 195 bool ScreenOrientationController::hasLastData() |
| 196 { | 196 { |
| 197 return true; | 197 return true; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void ScreenOrientationController::contextDestroyed() | 200 void ScreenOrientationController::contextDestroyed() |
| 201 { | 201 { |
| 202 m_client = nullptr; | 202 m_client = nullptr; |
| 203 LocalFrameLifecycleObserver::contextDestroyed(); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void ScreenOrientationController::notifyDispatcher() | 206 void ScreenOrientationController::notifyDispatcher() |
| 206 { | 207 { |
| 207 if (m_orientation && page()->isPageVisible()) | 208 if (m_orientation && page()->isPageVisible()) |
| 208 startUpdating(); | 209 startUpdating(); |
| 209 else | 210 else |
| 210 stopUpdating(); | 211 stopUpdating(); |
| 211 } | 212 } |
| 212 | 213 |
| 213 DEFINE_TRACE(ScreenOrientationController) | 214 DEFINE_TRACE(ScreenOrientationController) |
| 214 { | 215 { |
| 215 visitor->trace(m_orientation); | 216 visitor->trace(m_orientation); |
| 216 LocalFrameLifecycleObserver::trace(visitor); | 217 LocalFrameLifecycleObserver::trace(visitor); |
| 217 Supplement<LocalFrame>::trace(visitor); | 218 Supplement<LocalFrame>::trace(visitor); |
| 218 PlatformEventController::trace(visitor); | 219 PlatformEventController::trace(visitor); |
| 219 } | 220 } |
| 220 | 221 |
| 221 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |