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

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: Change PlatformEventController to take LocalFrame rather than Page. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ('k') | 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/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/TaskRunnerHelper.h" 8 #include "core/dom/TaskRunnerHelper.h"
9 #include "core/events/Event.h" 9 #include "core/events/Event.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 25 matching lines...) Expand all
36 LocalFrame& frame) { 36 LocalFrame& frame) {
37 return static_cast<ScreenOrientationControllerImpl*>( 37 return static_cast<ScreenOrientationControllerImpl*>(
38 ScreenOrientationController::from(frame)); 38 ScreenOrientationController::from(frame));
39 } 39 }
40 40
41 ScreenOrientationControllerImpl::ScreenOrientationControllerImpl( 41 ScreenOrientationControllerImpl::ScreenOrientationControllerImpl(
42 LocalFrame& frame, 42 LocalFrame& frame,
43 WebScreenOrientationClient* client) 43 WebScreenOrientationClient* client)
44 : ScreenOrientationController(frame), 44 : ScreenOrientationController(frame),
45 ContextLifecycleObserver(frame.document()), 45 ContextLifecycleObserver(frame.document()),
46 PlatformEventController(frame.page()), 46 PlatformEventController(&frame),
47 m_client(client), 47 m_client(client),
48 m_dispatchEventTimer( 48 m_dispatchEventTimer(
49 TaskRunnerHelper::get(TaskType::MiscPlatformAPI, &frame), 49 TaskRunnerHelper::get(TaskType::MiscPlatformAPI, &frame),
50 this, 50 this,
51 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {} 51 &ScreenOrientationControllerImpl::dispatchEventTimerFired) {}
52 52
53 // Compute the screen orientation using the orientation angle and the screen 53 // Compute the screen orientation using the orientation angle and the screen
54 // width / height. 54 // width / height.
55 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation( 55 WebScreenOrientationType ScreenOrientationControllerImpl::computeOrientation(
56 const IntRect& rect, 56 const IntRect& rect,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 DEFINE_TRACE(ScreenOrientationControllerImpl) { 237 DEFINE_TRACE(ScreenOrientationControllerImpl) {
238 visitor->trace(m_orientation); 238 visitor->trace(m_orientation);
239 ContextLifecycleObserver::trace(visitor); 239 ContextLifecycleObserver::trace(visitor);
240 Supplement<LocalFrame>::trace(visitor); 240 Supplement<LocalFrame>::trace(visitor);
241 PlatformEventController::trace(visitor); 241 PlatformEventController::trace(visitor);
242 } 242 }
243 243
244 } // namespace blink 244 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698