[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / views / win / fullscreen_handler.h
blob4a620d5e95693dfab4bdcadd101f747dae23b549
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_FULLSCREEN_HANDLER_H_
6 #define UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_
8 #include <windows.h>
10 #include <map>
12 #include "base/basictypes.h"
14 namespace gfx {
15 class Rect;
18 namespace views {
20 class FullscreenHandler {
21 public:
22 FullscreenHandler();
23 ~FullscreenHandler();
25 void set_hwnd(HWND hwnd) { hwnd_ = hwnd; }
27 void SetFullscreen(bool fullscreen);
28 void SetMetroSnap(bool metro_snap);
30 gfx::Rect GetRestoreBounds() const;
32 bool fullscreen() const { return fullscreen_; }
33 bool metro_snap() const { return metro_snap_; }
35 private:
36 // Information saved before going into fullscreen mode, used to restore the
37 // window afterwards.
38 struct SavedWindowInfo {
39 bool maximized;
40 LONG style;
41 LONG ex_style;
42 RECT window_rect;
45 void SetFullscreenImpl(bool fullscreen, bool for_metro);
47 HWND hwnd_;
48 bool fullscreen_;
49 bool metro_snap_;
51 // Saved window information from before entering fullscreen mode.
52 // TODO(beng): move to private once GetRestoredBounds() moves onto Widget.
53 SavedWindowInfo saved_window_info_;
55 DISALLOW_COPY_AND_ASSIGN(FullscreenHandler);
58 } // namespace views
60 #endif // UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_