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

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

Issue 10694031: [Mac] Remove the presentation mode button and its associated action from the tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge origin/master Created 8 years, 6 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/browser_window_controller_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ada02bceacee26a184cb77a76699ac58f6fad863..7c829808b14eff79228e959c265476c7ce0674af 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -94,26 +94,6 @@ const CGFloat kLocBarBottomInset = 1;
delegate:self]);
}
-- (void)createAndInstallPresentationModeToggleButton {
- DCHECK(base::mac::IsOSLionOrLater());
- if (presentationModeToggleButton_.get())
- return;
-
- // TODO(rohitrao): Make this button prettier.
- presentationModeToggleButton_.reset(
- [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 25, 25)]);
- NSButton* button = presentationModeToggleButton_.get();
- [button setButtonType:NSMomentaryLightButton];
- [button setBezelStyle:NSRegularSquareBezelStyle];
- [button setBordered:NO];
- [[button cell] setHighlightsBy:NSContentsCellMask];
- [[button cell] setShowsStateBy:NSContentsCellMask];
- [button setImage:[NSImage imageNamed:NSImageNameIChatTheaterTemplate]];
- [button setTarget:self];
- [button setAction:@selector(togglePresentationModeForLionOrLater:)];
- [[[[self window] contentView] superview] addSubview:button];
-}
-
- (void)saveWindowPositionIfNeeded {
if (!chrome::ShouldSaveWindowPlacement(browser_.get()))
return;
@@ -227,12 +207,6 @@ willPositionSheet:(NSWindow*)sheet
[presentationModeController_ floatingBarVerticalOffset]) : 0;
CGFloat maxY = NSMaxY(contentBounds) + yOffset;
- CGFloat overlayMaxY =
- NSMaxY([window frame]) +
- std::floor((1 - floatingBarShownFraction_) * floatingBarHeight);
- [self layoutPresentationModeToggleAtOverlayMaxX:NSMaxX([window frame])
- overlayMaxY:overlayMaxY];
-
if ([self hasTabStrip]) {
// If we need to lay out the top tab strip, replace |maxY| with a higher
// value, and then lay out the tab strip.
@@ -316,23 +290,6 @@ willPositionSheet:(NSWindow*)sheet
return totalHeight;
}
-- (void)layoutPresentationModeToggleAtOverlayMaxX:(CGFloat)maxX
- overlayMaxY:(CGFloat)maxY {
- // Lay out the presentation mode toggle button at the very top of the
- // tab strip.
- if ([self shouldShowPresentationModeToggle]) {
- [self createAndInstallPresentationModeToggleButton];
-
- NSPoint origin =
- NSMakePoint(maxX - NSWidth([presentationModeToggleButton_ frame]),
- maxY - NSHeight([presentationModeToggleButton_ frame]));
- [presentationModeToggleButton_ setFrameOrigin:origin];
- } else {
- [presentationModeToggleButton_ removeFromSuperview];
- presentationModeToggleButton_.reset();
- }
-}
-
- (CGFloat)layoutTabStripAtMaxY:(CGFloat)maxY
width:(CGFloat)width
fullscreen:(BOOL)fullscreen {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698