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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 10573003: Simplify fullscreen exit bubble on mac; updating always creates one freshly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 1975
1976 - (void)exitFullscreen { 1976 - (void)exitFullscreen {
1977 // url: and bubbleType: are ignored when leaving fullscreen. 1977 // url: and bubbleType: are ignored when leaving fullscreen.
1978 [self setFullscreen:NO url:GURL() bubbleType:FEB_TYPE_NONE]; 1978 [self setFullscreen:NO url:GURL() bubbleType:FEB_TYPE_NONE];
1979 } 1979 }
1980 1980
1981 - (void)updateFullscreenExitBubbleURL:(const GURL&)url 1981 - (void)updateFullscreenExitBubbleURL:(const GURL&)url
1982 bubbleType:(FullscreenExitBubbleType)bubbleType { 1982 bubbleType:(FullscreenExitBubbleType)bubbleType {
1983 fullscreenUrl_ = url; 1983 fullscreenUrl_ = url;
1984 fullscreenBubbleType_ = bubbleType; 1984 fullscreenBubbleType_ = bubbleType;
1985 if (bubbleType == FEB_TYPE_NONE || 1985 [self showFullscreenExitBubbleIfNecessary];
1986 bubbleType == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) {
1987 // Show no exit instruction bubble on Mac when in Browser Fullscreen.
1988 [self destroyFullscreenExitBubbleIfNecessary];
1989 } else {
1990 if (!fullscreenExitBubbleController_.get()) {
1991 [self showFullscreenExitBubbleIfNecessary];
1992 }
1993 [fullscreenExitBubbleController_.get() updateURL:url bubbleType:bubbleType];
1994 }
1995 } 1986 }
1996 1987
1997 - (BOOL)isFullscreen { 1988 - (BOOL)isFullscreen {
1998 return (fullscreenWindow_.get() != nil) || 1989 return (fullscreenWindow_.get() != nil) ||
1999 ([[self window] styleMask] & NSFullScreenWindowMask) || 1990 ([[self window] styleMask] & NSFullScreenWindowMask) ||
2000 enteringFullscreen_; 1991 enteringFullscreen_;
2001 } 1992 }
2002 1993
2003 - (void)togglePresentationModeForLionOrLater:(id)sender { 1994 - (void)togglePresentationModeForLionOrLater:(id)sender {
2004 // Called only by the presentation mode toggle button. 1995 // Called only by the presentation mode toggle button.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 2208
2218 - (BOOL)supportsBookmarkBar { 2209 - (BOOL)supportsBookmarkBar {
2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2210 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2220 } 2211 }
2221 2212
2222 - (BOOL)isTabbedWindow { 2213 - (BOOL)isTabbedWindow {
2223 return browser_->is_type_tabbed(); 2214 return browser_->is_type_tabbed();
2224 } 2215 }
2225 2216
2226 @end // @implementation BrowserWindowController(WindowType) 2217 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698