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

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

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win work 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_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 35a8ebba45d9114c669574fd8dd7c7486dd0390b..e40f8d663713aa1264b537192cfd701060e196ed 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -256,6 +256,7 @@ willPositionSheet:(NSWindow*)sheet
// presentation mode, it hangs off the top of the screen when the bar is
// hidden. The find bar is unaffected by the side tab positioning.
[findBarCocoaController_ positionFindBarViewAtMaxY:maxY maxWidth:width];
+ [fullscreenExitBubbleController_ positionInWindowAtTop:maxY width:width];
// If in presentation mode, reset |maxY| to top of screen, so that the
// floating bar slides over the things which appear to be in the content area.
@@ -779,7 +780,8 @@ willPositionSheet:(NSWindow*)sheet
: [toolbarController_ view]];
}
-- (void)showFullscreenExitBubbleIfNecessary {
+- (void)showFullscreenExitBubbleIfNecessaryWithURL:(const GURL&)url
+ showButtons:(BOOL)show_buttons {
if (!browser_->is_fullscreen_for_tab()) {
return;
}
@@ -788,18 +790,19 @@ willPositionSheet:(NSWindow*)sheet
fullscreenExitBubbleController_.reset(
[[FullscreenExitBubbleController alloc] initWithOwner:self
- browser:browser_.get()]);
+ browser:browser_.get()
+ forURL:url
+ showButtons:show_buttons]);
NSView* contentView = [[self window] contentView];
CGFloat maxWidth = NSWidth([contentView frame]);
CGFloat maxY = NSMaxY([[[self window] contentView] frame]);
[fullscreenExitBubbleController_
positionInWindowAtTop:maxY width:maxWidth];
- [contentView addSubview:[fullscreenExitBubbleController_ view]
- positioned:NSWindowAbove relativeTo:[self tabContentArea]];
+ [fullscreenExitBubbleController_ showWindow];
}
- (void)destroyFullscreenExitBubbleIfNecessary {
- [[fullscreenExitBubbleController_ view] removeFromSuperview];
+ [fullscreenExitBubbleController_ close];
fullscreenExitBubbleController_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698