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

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

Issue 2645823002: Change PlatformEventController to take LocalFrame rather than Page. (Closed)
Patch Set: 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 24 matching lines...) Expand all
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 : ScreenOrientationController(frame), 43 : ScreenOrientationController(frame),
44 ContextLifecycleObserver(frame.document()), 44 ContextLifecycleObserver(frame.document()),
45 PlatformEventController(frame.page()), 45 PlatformEventController(&frame),
46 m_client(client), 46 m_client(client),
47 m_dispatchEventTimer( 47 m_dispatchEventTimer(
48 this, 48 this,
49 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {} 49 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {}
50 50
51 // Compute the screen orientation using the orientation angle and the screen 51 // Compute the screen orientation using the orientation angle and the screen
52 // width / height. 52 // width / height.
53 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation( 53 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation(
54 const IntRect& rect, 54 const IntRect& rect,
55 uint16_t rotation) { 55 uint16_t rotation) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 DEFINE_TRACE(ScreenOrientationControllerImpl) { 225 DEFINE_TRACE(ScreenOrientationControllerImpl) {
226 visitor->trace(m_orientation); 226 visitor->trace(m_orientation);
227 ContextLifecycleObserver::trace(visitor); 227 ContextLifecycleObserver::trace(visitor);
228 Supplement<LocalFrame>::trace(visitor); 228 Supplement<LocalFrame>::trace(visitor);
229 PlatformEventController::trace(visitor); 229 PlatformEventController::trace(visitor);
230 } 230 }
231 231
232 } // namespace blink 232 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698