Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / cocoa / fullscreen_window_manager.h
blobbe59cad49c3fe67b43b5dbbefa946e0e582a659a
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_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_
6 #define UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/mac_util.h"
11 #include "base/mac/scoped_nsobject.h"
12 #include "ui/base/ui_base_export.h"
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 UI_BASE_EXPORT
17 @interface FullscreenWindowManager : NSObject {
18 @private
19 base::scoped_nsobject<NSWindow> window_;
20 // Explicitly keep track of the screen we want to position the window in.
21 // This is better than using -[NSWindow screen] because that might change if
22 // the screen changes to a low resolution.
23 base::scoped_nsobject<NSScreen> desiredScreen_;
24 base::mac::FullScreenMode fullscreenMode_;
25 BOOL fullscreenActive_;
28 - (id)initWithWindow:(NSWindow*)window
29 desiredScreen:(NSScreen*)desiredScreen;
31 // Enables fullscreen mode which causes the menubar and dock to be hidden as
32 // needed.
33 - (void)enterFullscreenMode;
35 // Exists fullscreen mode which stops hiding the menubar and dock.
36 - (void)exitFullscreenMode;
38 @end
40 #endif // UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_