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

Unified Diff: third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.h

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, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.h
diff --git a/third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.h b/third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.h
new file mode 100644
index 0000000000000000000000000000000000000000..a51db2d6d6570c71f749b8e50b02bd4cddf7efc2
--- /dev/null
+++ b/third_party/WebKit/Source/platform/ScopedOrientationChangeIndicator.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ScopedOrientationChangeIndicator_h
+#define ScopedOrientationChangeIndicator_h
+
+#include "platform/PlatformExport.h"
+#include "wtf/Allocator.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class PLATFORM_EXPORT ScopedOrientationChangeIndicator final {
+ STACK_ALLOCATED();
+ WTF_MAKE_NONCOPYABLE(ScopedOrientationChangeIndicator);
+public:
+ static bool processingOrientationChange();
+
+ explicit ScopedOrientationChangeIndicator();
+ ~ScopedOrientationChangeIndicator();
+
+private:
+ enum class State {
+ Processing,
+ NotProcessing,
+ };
+
+ static State s_state;
+
+ State m_previousState = State::NotProcessing;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698