| 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 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 [self setFullscreen:YES url:url bubbleType:bubbleType]; | 1973 [self setFullscreen:YES url:url bubbleType:bubbleType]; |
| 1974 } | 1974 } |
| 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 [fullscreenExitBubbleController_.get() updateURL:url bubbleType:bubbleType]; | 1983 fullscreenUrl_ = url; |
| 1984 fullscreenBubbleType_ = bubbleType; |
| 1985 if (bubbleType == FEB_TYPE_NONE) { |
| 1986 [self destroyFullscreenExitBubbleIfNecessary]; |
| 1987 } else { |
| 1988 if (!fullscreenExitBubbleController_.get()) { |
| 1989 [self showFullscreenExitBubbleIfNecessary]; |
| 1990 } |
| 1991 [fullscreenExitBubbleController_.get() updateURL:url bubbleType:bubbleType]; |
| 1992 } |
| 1984 } | 1993 } |
| 1985 | 1994 |
| 1986 - (BOOL)isFullscreen { | 1995 - (BOOL)isFullscreen { |
| 1987 return (fullscreenWindow_.get() != nil) || | 1996 return (fullscreenWindow_.get() != nil) || |
| 1988 ([[self window] styleMask] & NSFullScreenWindowMask) || | 1997 ([[self window] styleMask] & NSFullScreenWindowMask) || |
| 1989 enteringFullscreen_; | 1998 enteringFullscreen_; |
| 1990 } | 1999 } |
| 1991 | 2000 |
| 1992 - (void)togglePresentationModeForLionOrLater:(id)sender { | 2001 - (void)togglePresentationModeForLionOrLater:(id)sender { |
| 1993 // Called only by the presentation mode toggle button. | 2002 // Called only by the presentation mode toggle button. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2206 | 2215 |
| 2207 - (BOOL)supportsBookmarkBar { | 2216 - (BOOL)supportsBookmarkBar { |
| 2208 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2217 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2209 } | 2218 } |
| 2210 | 2219 |
| 2211 - (BOOL)isTabbedWindow { | 2220 - (BOOL)isTabbedWindow { |
| 2212 return browser_->is_type_tabbed(); | 2221 return browser_->is_type_tabbed(); |
| 2213 } | 2222 } |
| 2214 | 2223 |
| 2215 @end // @implementation BrowserWindowController(WindowType) | 2224 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |