Chromium Code Reviews| 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_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_ | |
| 6 #define UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #import <Cocoa/Cocoa.h> | |
| 10 | |
| 11 #include "base/mac/mac_util.h" | |
| 12 #include "base/memory/scoped_nsobject.h" | |
| 13 | |
| 14 // A utility class to manage the fullscreen mode for a given window. This class | |
| 15 // also updates the window frame if the screen changes. | |
| 16 @interface FullscreenWindowManager : NSObject { | |
| 17 @private | |
| 18 scoped_nsobject<NSWindow> window_; | |
| 19 // Explicitly keep track of the screen we want to position the window in. | |
| 20 // This is better than using -[NSWindow screen] because that might change if | |
| 21 // the screen changes to a low resolution. | |
| 22 scoped_nsobject<NSScreen> desiredScreen_; | |
| 23 base::mac::FullScreenMode fullscreenMode_; | |
| 24 BOOL fullscreenEnabled_; | |
|
Nico
2012/03/30 19:33:57
fullscreenActive_
sail
2012/03/30 23:06:06
Done.
| |
| 25 } | |
| 26 | |
| 27 - (id)initWithWindow:(NSWindow*)window | |
| 28 desiredScreen:(NSScreen*)desiredScreen; | |
| 29 | |
| 30 // Enables fullscreen mode which causes the menubar and dock to be hidden as | |
| 31 // needed. | |
| 32 - (void)enterFullscreenMode; | |
| 33 | |
| 34 // Exists fullscreen mode which stops hiding the menubar and dock. | |
| 35 - (void)exitFullscreenMode; | |
| 36 | |
| 37 @end | |
| 38 | |
| 39 #endif // UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_ | |
| OLD | NEW |