blob: be59cad49c3fe67b43b5dbbefa946e0e582a659a [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_base_export.h"
// A utility class to manage the fullscreen mode for a given window. This class
// also updates the window frame if the screen changes.
@interface FullscreenWindowManager : NSObject {
base::scoped_nsobject<NSWindow> window_;
// Explicitly keep track of the screen we want to position the window in.
// This is better than using -[NSWindow screen] because that might change if
// the screen changes to a low resolution.
base::scoped_nsobject<NSScreen> desiredScreen_;
base::mac::FullScreenMode fullscreenMode_;
BOOL fullscreenActive_;
- (id)initWithWindow:(NSWindow*)window
// Enables fullscreen mode which causes the menubar and dock to be hidden as
// needed.
- (void)enterFullscreenMode;
// Exists fullscreen mode which stops hiding the menubar and dock.
- (void)exitFullscreenMode;