Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / views / win / scoped_fullscreen_visibility.h
blobb78b800ee18f6caac36fe6c165be79a3cf03d10c
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_
8 #include <windows.h>
10 #include <map>
12 #include "base/basictypes.h"
13 #include "ui/views/views_export.h"
15 namespace views {
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
19 // might suffer.
20 class VIEWS_EXPORT ScopedFullscreenVisibility {
21 public:
22 explicit ScopedFullscreenVisibility(HWND hwnd);
23 ~ScopedFullscreenVisibility();
25 // Returns true if |hwnd| is currently hidden due to instance(s) of this
26 // class.
27 static bool IsHiddenForFullscreen(HWND hwnd);
29 private:
30 typedef std::map<HWND, int> FullscreenHWNDs;
32 HWND hwnd_;
34 static FullscreenHWNDs* full_screen_windows_;
36 DISALLOW_COPY_AND_ASSIGN(ScopedFullscreenVisibility);
39 } // namespace views
41 #endif // UI_VIEWS_WIN_SCOPED_FULLSCREEN_VISIBILITY_H_