| OLD | NEW |
| 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 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1976 [self setFullscreen:YES url:url bubbleType:bubbleType]; | 1976 [self setFullscreen:YES url:url bubbleType:bubbleType]; |
| 1977 } | 1977 } |
| 1978 | 1978 |
| 1979 - (void)exitFullscreen { | 1979 - (void)exitFullscreen { |
| 1980 // url: and bubbleType: are ignored when leaving fullscreen. | 1980 // url: and bubbleType: are ignored when leaving fullscreen. |
| 1981 [self setFullscreen:NO url:GURL() bubbleType:FEB_TYPE_NONE]; | 1981 [self setFullscreen:NO url:GURL() bubbleType:FEB_TYPE_NONE]; |
| 1982 } | 1982 } |
| 1983 | 1983 |
| 1984 - (void)updateFullscreenExitBubbleURL:(const GURL&)url | 1984 - (void)updateFullscreenExitBubbleURL:(const GURL&)url |
| 1985 bubbleType:(FullscreenExitBubbleType)bubbleType { | 1985 bubbleType:(FullscreenExitBubbleType)bubbleType { |
| 1986 [fullscreenExitBubbleController_.get() updateURL:url bubbleType:bubbleType]; | 1986 fullscreenUrl_ = url; |
| 1987 fullscreenBubbleType_ = bubbleType; |
| 1988 if (bubbleType == FEB_TYPE_NONE) { |
| 1989 [self destroyFullscreenExitBubbleIfNecessary]; |
| 1990 } else { |
| 1991 if (!fullscreenExitBubbleController_.get()) { |
| 1992 [self showFullscreenExitBubbleIfNecessary]; |
| 1993 } |
| 1994 [fullscreenExitBubbleController_.get() updateURL:url bubbleType:bubbleType]; |
| 1995 } |
| 1987 } | 1996 } |
| 1988 | 1997 |
| 1989 - (BOOL)isFullscreen { | 1998 - (BOOL)isFullscreen { |
| 1990 return (fullscreenWindow_.get() != nil) || | 1999 return (fullscreenWindow_.get() != nil) || |
| 1991 ([[self window] styleMask] & NSFullScreenWindowMask) || | 2000 ([[self window] styleMask] & NSFullScreenWindowMask) || |
| 1992 enteringFullscreen_; | 2001 enteringFullscreen_; |
| 1993 } | 2002 } |
| 1994 | 2003 |
| 1995 - (void)togglePresentationModeForLionOrLater:(id)sender { | 2004 - (void)togglePresentationModeForLionOrLater:(id)sender { |
| 1996 // Called only by the presentation mode toggle button. | 2005 // Called only by the presentation mode toggle button. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 | 2218 |
| 2210 - (BOOL)supportsBookmarkBar { | 2219 - (BOOL)supportsBookmarkBar { |
| 2211 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2220 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2212 } | 2221 } |
| 2213 | 2222 |
| 2214 - (BOOL)isTabbedWindow { | 2223 - (BOOL)isTabbedWindow { |
| 2215 return browser_->is_type_tabbed(); | 2224 return browser_->is_type_tabbed(); |
| 2216 } | 2225 } |
| 2217 | 2226 |
| 2218 @end // @implementation BrowserWindowController(WindowType) | 2227 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |