1 // Copyright (c) 2012 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.
5 #ifndef UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_
6 #define UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_
12 #include "base/basictypes.h"
13 #include "ui/views/views_export.h"
17 // Scoping class that ensures a HWND remains hidden while it enters or leaves
18 // the fullscreen state. This reduces some flicker-jank that an application UI
20 class VIEWS_EXPORT ScopedFullscreenVisibility
{
22 explicit ScopedFullscreenVisibility(HWND hwnd
);
23 ~ScopedFullscreenVisibility();
25 // Returns true if |hwnd| is currently hidden due to instance(s) of this
27 static bool IsHiddenForFullscreen(HWND hwnd
);
30 typedef std::map
<HWND
, int> FullscreenHWNDs
;
34 static FullscreenHWNDs
* full_screen_windows_
;
36 DISALLOW_COPY_AND_ASSIGN(ScopedFullscreenVisibility
);
41 #endif // UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_