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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.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, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 fullscreenBubbleType_ = bubbleType; 1993 fullscreenBubbleType_ = bubbleType;
1994 [self showFullscreenExitBubbleIfNecessary]; 1994 [self showFullscreenExitBubbleIfNecessary];
1995 } 1995 }
1996 1996
1997 - (BOOL)isFullscreen { 1997 - (BOOL)isFullscreen {
1998 return (fullscreenWindow_.get() != nil) || 1998 return (fullscreenWindow_.get() != nil) ||
1999 ([[self window] styleMask] & NSFullScreenWindowMask) || 1999 ([[self window] styleMask] & NSFullScreenWindowMask) ||
2000 enteringFullscreen_; 2000 enteringFullscreen_;
2001 } 2001 }
2002 2002
2003 - (void)togglePresentationModeForLionOrLater:(id)sender {
2004 // Called only by the presentation mode toggle button.
2005 DCHECK(base::mac::IsOSLionOrLater());
2006 enteredPresentationModeFromFullscreen_ = YES;
2007 chrome::ExecuteCommand(browser_.get(), IDC_PRESENTATION_MODE);
2008 }
2009
2010 // On Lion, this function is called by either the presentation mode toggle 2003 // On Lion, this function is called by either the presentation mode toggle
2011 // button or the "Enter Presentation Mode" menu item. In the latter case, this 2004 // button or the "Enter Presentation Mode" menu item. In the latter case, this
2012 // function also triggers the Lion machinery to enter fullscreen mode as well as 2005 // function also triggers the Lion machinery to enter fullscreen mode as well as
2013 // set presentation mode. On Snow Leopard, this function is called by the 2006 // set presentation mode. On Snow Leopard, this function is called by the
2014 // "Enter Presentation Mode" menu item, and triggering presentation mode always 2007 // "Enter Presentation Mode" menu item, and triggering presentation mode always
2015 // moves the user into fullscreen mode. 2008 // moves the user into fullscreen mode.
2016 - (void)setPresentationMode:(BOOL)presentationMode 2009 - (void)setPresentationMode:(BOOL)presentationMode
2017 url:(const GURL&)url 2010 url:(const GURL&)url
2018 bubbleType:(FullscreenExitBubbleType)bubbleType { 2011 bubbleType:(FullscreenExitBubbleType)bubbleType {
2019 fullscreenUrl_ = url; 2012 fullscreenUrl_ = url;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 2210
2218 - (BOOL)supportsBookmarkBar { 2211 - (BOOL)supportsBookmarkBar {
2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2212 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2220 } 2213 }
2221 2214
2222 - (BOOL)isTabbedWindow { 2215 - (BOOL)isTabbedWindow {
2223 return browser_->is_type_tabbed(); 2216 return browser_->is_type_tabbed();
2224 } 2217 }
2225 2218
2226 @end // @implementation BrowserWindowController(WindowType) 2219 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698