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

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: respond to comments 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 2db44e052a98666005f3d2fac897df1c698ac459..ea24d37f3726389fcbaccdae08cb03aadae1a0c7 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1903,7 +1903,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
+ forURL:(const GURL&)url
+ askPermission:(BOOL)askPermission {
if (fullscreen == [self isFullscreen])
return;
@@ -1921,8 +1923,9 @@ willAnimateFromState:(bookmarks::VisualState)oldState
[self exitFullscreenForSnowLeopardOrEarlier];
}
- if (fullscreen) {
- [self showFullscreenExitBubbleIfNecessary];
+ if (fullscreen && !url.is_empty()) {
+ [self showFullscreenExitBubbleIfNecessaryWithURL:url
+ askPermission:askPermission];
} else {
[self destroyFullscreenExitBubbleIfNecessary];
}
@@ -1946,11 +1949,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
+ forURL:url
+ askPermission:askPermission];
return;
}
@@ -1981,7 +1988,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