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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 ScreenOrientationControllerImpl* ScreenOrientationControllerImpl::from( | 34 ScreenOrientationControllerImpl* ScreenOrientationControllerImpl::from( |
35 LocalFrame& frame) { | 35 LocalFrame& frame) { |
36 return static_cast<ScreenOrientationControllerImpl*>( | 36 return static_cast<ScreenOrientationControllerImpl*>( |
37 ScreenOrientationController::from(frame)); | 37 ScreenOrientationController::from(frame)); |
38 } | 38 } |
39 | 39 |
40 ScreenOrientationControllerImpl::ScreenOrientationControllerImpl( | 40 ScreenOrientationControllerImpl::ScreenOrientationControllerImpl( |
41 LocalFrame& frame, | 41 LocalFrame& frame, |
42 WebScreenOrientationClient* client) | 42 WebScreenOrientationClient* client) |
43 : ContextLifecycleObserver(frame.document()), | 43 : ScreenOrientationController(frame), |
| 44 ContextLifecycleObserver(frame.document()), |
44 PlatformEventController(frame.page()), | 45 PlatformEventController(frame.page()), |
45 m_client(client), | 46 m_client(client), |
46 m_dispatchEventTimer( | 47 m_dispatchEventTimer( |
47 this, | 48 this, |
48 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {} | 49 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {} |
49 | 50 |
50 // Compute the screen orientation using the orientation angle and the screen | 51 // Compute the screen orientation using the orientation angle and the screen |
51 // width / height. | 52 // width / height. |
52 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation( | 53 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation( |
53 const IntRect& rect, | 54 const IntRect& rect, |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 223 } |
223 | 224 |
224 DEFINE_TRACE(ScreenOrientationControllerImpl) { | 225 DEFINE_TRACE(ScreenOrientationControllerImpl) { |
225 visitor->trace(m_orientation); | 226 visitor->trace(m_orientation); |
226 ContextLifecycleObserver::trace(visitor); | 227 ContextLifecycleObserver::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 |
OLD | NEW |