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

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

Issue 2175863002: Allow going fullscreen during a screen orientation change handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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/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"
11 #include "core/page/ChromeClient.h" 11 #include "core/page/ChromeClient.h"
12 #include "core/page/Page.h" 12 #include "core/page/Page.h"
13 #include "modules/screen_orientation/ScreenOrientation.h" 13 #include "modules/screen_orientation/ScreenOrientation.h"
14 #include "modules/screen_orientation/ScreenOrientationDispatcher.h" 14 #include "modules/screen_orientation/ScreenOrientationDispatcher.h"
15 #include "platform/LayoutTestSupport.h" 15 #include "platform/LayoutTestSupport.h"
16 #include "platform/ScopedOrientationChangeIndicator.h"
16 #include "public/platform/WebScreenInfo.h" 17 #include "public/platform/WebScreenInfo.h"
17 #include "public/platform/modules/screen_orientation/WebScreenOrientationClient. h" 18 #include "public/platform/modules/screen_orientation/WebScreenOrientationClient. h"
18 19
19 namespace blink { 20 namespace blink {
20 21
21 ScreenOrientationController::~ScreenOrientationController() 22 ScreenOrientationController::~ScreenOrientationController()
22 { 23 {
23 } 24 }
24 25
25 void ScreenOrientationController::provideTo(LocalFrame& frame, WebScreenOrientat ionClient* client) 26 void ScreenOrientationController::provideTo(LocalFrame& frame, WebScreenOrientat ionClient* client)
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // When detached, the client is no longer valid. 168 // When detached, the client is no longer valid.
168 if (!m_client) 169 if (!m_client)
169 return; 170 return;
170 m_client->unlockOrientation(); 171 m_client->unlockOrientation();
171 } 172 }
172 173
173 void ScreenOrientationController::dispatchEventTimerFired(Timer<ScreenOrientatio nController>*) 174 void ScreenOrientationController::dispatchEventTimerFired(Timer<ScreenOrientatio nController>*)
174 { 175 {
175 if (!m_orientation) 176 if (!m_orientation)
176 return; 177 return;
178
179 ScopedOrientationChangeIndicator orientationChangeIndicator;
177 m_orientation->dispatchEvent(Event::create(EventTypeNames::change)); 180 m_orientation->dispatchEvent(Event::create(EventTypeNames::change));
178 } 181 }
179 182
180 void ScreenOrientationController::didUpdateData() 183 void ScreenOrientationController::didUpdateData()
181 { 184 {
182 // Do nothing. 185 // Do nothing.
183 } 186 }
184 187
185 void ScreenOrientationController::registerWithDispatcher() 188 void ScreenOrientationController::registerWithDispatcher()
186 { 189 {
(...skipping 26 matching lines...) Expand all
213 216
214 DEFINE_TRACE(ScreenOrientationController) 217 DEFINE_TRACE(ScreenOrientationController)
215 { 218 {
216 visitor->trace(m_orientation); 219 visitor->trace(m_orientation);
217 LocalFrameLifecycleObserver::trace(visitor); 220 LocalFrameLifecycleObserver::trace(visitor);
218 Supplement<LocalFrame>::trace(visitor); 221 Supplement<LocalFrame>::trace(visitor);
219 PlatformEventController::trace(visitor); 222 PlatformEventController::trace(visitor);
220 } 223 }
221 224
222 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698