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

Unified Diff: ui/views/win/scoped_fullscreen_visibility.h

Issue 10871020: Move Fullscreen stuff onto FullscreenHandler type that hangs off NWW. This is the first step in mov… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/win/fullscreen_handler.cc ('k') | ui/views/win/scoped_fullscreen_visibility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/scoped_fullscreen_visibility.h
===================================================================
--- ui/views/win/scoped_fullscreen_visibility.h (revision 0)
+++ ui/views/win/scoped_fullscreen_visibility.h (revision 0)
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 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 UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_
+#define UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_
+
+#include <windows.h>
+
+#include <map>
+
+#include "base/basictypes.h"
+#include "ui/views/views_export.h"
+
+namespace views {
+
+// Scoping class that ensures a HWND remains hidden while it enters or leaves
+// the fullscreen state. This reduces some flicker-jank that an application UI
+// might suffer.
+class VIEWS_EXPORT ScopedFullscreenVisibility {
+ public:
+ explicit ScopedFullscreenVisibility(HWND hwnd);
+ ~ScopedFullscreenVisibility();
+
+ // Returns true if |hwnd| is currently hidden due to instance(s) of this
+ // class.
+ static bool IsHiddenForFullscreen(HWND hwnd);
+
+ private:
+ typedef std::map<HWND, int> FullscreenHWNDs;
+
+ HWND hwnd_;
+
+ static FullscreenHWNDs* full_screen_windows_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedFullscreenVisibility);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_
« no previous file with comments | « ui/views/win/fullscreen_handler.cc ('k') | ui/views/win/scoped_fullscreen_visibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698