OLD | NEW |
(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 // TODO(beng): Temporary dependancy until fullscreen moves to |
| 21 // HWNDMessageHandler. |
| 22 class Widget; |
| 23 |
| 24 class FullscreenHandler { |
| 25 public: |
| 26 explicit FullscreenHandler(Widget* widget); |
| 27 ~FullscreenHandler(); |
| 28 |
| 29 void SetFullscreen(bool fullscreen); |
| 30 void SetMetroSnap(bool metro_snap); |
| 31 |
| 32 gfx::Rect GetRestoreBounds() const; |
| 33 |
| 34 bool fullscreen() const { return fullscreen_; } |
| 35 bool metro_snap() const { return metro_snap_; } |
| 36 |
| 37 private: |
| 38 // Information saved before going into fullscreen mode, used to restore the |
| 39 // window afterwards. |
| 40 struct SavedWindowInfo { |
| 41 bool maximized; |
| 42 LONG style; |
| 43 LONG ex_style; |
| 44 RECT window_rect; |
| 45 }; |
| 46 |
| 47 void SetFullscreenImpl(bool fullscreen, bool for_metro); |
| 48 |
| 49 Widget* widget_; |
| 50 bool fullscreen_; |
| 51 bool metro_snap_; |
| 52 |
| 53 // Saved window information from before entering fullscreen mode. |
| 54 // TODO(beng): move to private once GetRestoredBounds() moves onto Widget. |
| 55 SavedWindowInfo saved_window_info_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(FullscreenHandler); |
| 58 }; |
| 59 |
| 60 } // namespace views |
| 61 |
| 62 #endif // UI_VIEWS_WIN_FULLSCREEN_HANDLER_H_ |
OLD | NEW |