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

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

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows compile fix Created 9 years, 2 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: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 84e053d230be987817e39c65ab082e31cf621a6e..382904e02d4004d8f5b0fb6219939560a8ea253d 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1913,7 +1913,9 @@ willAnimateFromState:(bookmarks::VisualState)oldState
// "Enter Full Screen" menu item. On Snow Leopard, this function is never
// called by the UI directly, but it provides the implementation for
// |-setPresentationMode:|.
-- (void)setFullscreen:(BOOL)fullscreen {
+- (void)setFullscreen:(BOOL)fullscreen
+ url:(const GURL&)url
+ askPermission:(BOOL)askPermission {
if (fullscreen == [self isFullscreen])
return;
@@ -1931,8 +1933,9 @@ willAnimateFromState:(bookmarks::VisualState)oldState
[self exitFullscreenForSnowLeopardOrEarlier];
}
- if (fullscreen) {
- [self showFullscreenExitBubbleIfNecessary];
+ if (fullscreen && !url.is_empty()) {
+ [self showFullscreenExitBubbleIfNecessaryWithURL:url
+ askPermission:askPermission];
} else {
[self destroyFullscreenExitBubbleIfNecessary];
}
@@ -1956,11 +1959,15 @@ willAnimateFromState:(bookmarks::VisualState)oldState
// set presentation mode. On Snow Leopard, this function is called by the
// "Enter Presentation Mode" menu item, and triggering presentation mode always
// moves the user into fullscreen mode.
-- (void)setPresentationMode:(BOOL)presentationMode {
+- (void)setPresentationMode:(BOOL)presentationMode
+ url:(const GURL&)url
+ askPermission:(BOOL)askPermission {
// Presentation mode on Leopard and Snow Leopard maps directly to fullscreen
// mode.
if (base::mac::IsOSSnowLeopardOrEarlier()) {
- [self setFullscreen:presentationMode];
+ [self setFullscreen:presentationMode
+ url:url
+ askPermission:askPermission];
return;
}
@@ -1991,7 +1998,8 @@ willAnimateFromState:(bookmarks::VisualState)oldState
[static_cast<FramedBrowserWindow*>(window) toggleSystemFullScreen];
}
- [self showFullscreenExitBubbleIfNecessary];
+ [self showFullscreenExitBubbleIfNecessaryWithURL:url
+ askPermission:askPermission];
} else {
if (enteredPresentationModeFromFullscreen_) {
// The window is currently in fullscreen mode, but the user is choosing to

Powered by Google App Engine
This is Rietveld 408576698