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

Side by Side Diff: ui/views/win/fullscreen_handler.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « ui/views/win/DEPS ('k') | ui/views/win/fullscreen_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_
6 #define UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_
7
8 #include <windows.h>
9
10 #include <map>
11
12 #include "base/basictypes.h"
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace views {
19
20 class FullscreenHandler {
21 public:
22 FullscreenHandler();
23 ~FullscreenHandler();
24
25 void set_hwnd(HWND hwnd) { hwnd_ = hwnd; }
26
27 void SetFullscreen(bool fullscreen);
28 void SetMetroSnap(bool metro_snap);
29
30 gfx::Rect GetRestoreBounds() const;
31
32 bool fullscreen() const { return fullscreen_; }
33 bool metro_snap() const { return metro_snap_; }
34
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;
43 };
44
45 void SetFullscreenImpl(bool fullscreen, bool for_metro);
46
47 HWND hwnd_;
48 bool fullscreen_;
49 bool metro_snap_;
50
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_;
54
55 DISALLOW_COPY_AND_ASSIGN(FullscreenHandler);
56 };
57
58 } // namespace views
59
60 #endif // UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/views/win/DEPS ('k') | ui/views/win/fullscreen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698