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

Unified Diff: chrome/browser/ui/cocoa/framed_browser_window.mm

Issue 7566016: Fullscreen support for Lion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/cocoa/framed_browser_window.h ('k') | chrome/browser/ui/cocoa/fullscreen_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/framed_browser_window.mm
===================================================================
--- chrome/browser/ui/cocoa/framed_browser_window.mm (revision 95517)
+++ chrome/browser/ui/cocoa/framed_browser_window.mm (working copy)
@@ -13,6 +13,18 @@
#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
#include "chrome/browser/themes/theme_service.h"
+// Provide the forward-declarations of new 10.7 SDK symbols so they can be
+// called when building with the 10.5 SDK.
+#if !defined(MAC_OS_X_VERSION_10_7) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+
+@interface NSWindow (LionSDKDeclarations)
+- (void)toggleFullScreen:(id)sender;
+@end
+
+#endif // MAC_OS_X_VERSION_10_7
+
+
// Implementer's note: Moving the window controls is tricky. When altering the
// code, ensure that:
// - accessibility hit testing works
@@ -273,4 +285,19 @@
return [super constrainFrameRect:frame toScreen:screen];
}
+// This method is overridden in order to send the toggle fullscreen message
+// through the cross-platform browser framework before going fullscreen. The
+// message will eventually come back as a call to |-toggleSystemFullScreen|,
+// which in turn calls AppKit's |NSWindow -toggleFullScreen:|.
+- (void)toggleFullScreen:(id)sender {
+ id delegate = [self delegate];
+ if ([delegate respondsToSelector:@selector(handleLionToggleFullscreen)])
+ [delegate handleLionToggleFullscreen];
+}
+
+- (void)toggleSystemFullScreen {
+ if ([super respondsToSelector:@selector(toggleFullScreen:)])
+ [super toggleFullScreen:nil];
+}
+
@end
« no previous file with comments | « chrome/browser/ui/cocoa/framed_browser_window.h ('k') | chrome/browser/ui/cocoa/fullscreen_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698