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

Side by Side Diff: third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "platform/ScopedOrientationChangeIndicator.h"
6
7 #include "wtf/Assertions.h"
8
9 namespace blink {
10
11 ScopedOrientationChangeIndicator::State ScopedOrientationChangeIndicator::s_stat e = ScopedOrientationChangeIndicator::State::NotProcessing;
12
13 ScopedOrientationChangeIndicator::ScopedOrientationChangeIndicator()
14 {
15 DCHECK(isMainThread());
16
17 m_previousState = s_state;
18 s_state = State::Processing;
19 }
20
21 ScopedOrientationChangeIndicator::~ScopedOrientationChangeIndicator()
22 {
23 DCHECK(isMainThread());
24 s_state = m_previousState;
25 }
26
27 // static
28 bool ScopedOrientationChangeIndicator::processingOrientationChange()
29 {
30 DCHECK(isMainThread());
31 return s_state == State::Processing;
32 }
33
34 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698