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

Unified Diff: ui/base/cocoa/fullscreen_window_manager.h

Issue 9838071: Implement pepper flash fullscreen on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/cocoa/fullscreen_window_manager.h
diff --git a/ui/base/cocoa/fullscreen_window_manager.h b/ui/base/cocoa/fullscreen_window_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d67fa20783475f1eaf14a19ccaf0c2d44906164
--- /dev/null
+++ b/ui/base/cocoa/fullscreen_window_manager.h
@@ -0,0 +1,35 @@
+// 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.
+
+#ifndef UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_
+#define UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/mac/mac_util.h"
+#include "base/memory/scoped_nsobject.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 {
+ @private
+ 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.
+ scoped_nsobject<NSScreen> desiredScreen_;
+ base::mac::FullScreenMode fullscreenMode_;
+ bool fullscreenEnabled_;
+}
+
+- (id)initWithWindow:(NSWindow*)window
+ desiredScreen:(NSScreen*)desiredScreen;
+
+- (void)enterFullscreenMode;
+- (void)exitFullscreenMode;
+
+@end
+
+#endif // UI_BASE_COCOA_FULLSCREEN_WINDOW_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698