| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1937 } | 1937 } |
| 1938 | 1938 |
| 1939 - (void)updateFullscreenExitBubbleURL:(const GURL&)url | 1939 - (void)updateFullscreenExitBubbleURL:(const GURL&)url |
| 1940 bubbleType:(ExclusiveAccessBubbleType)bubbleType { | 1940 bubbleType:(ExclusiveAccessBubbleType)bubbleType { |
| 1941 fullscreenUrl_ = url; | 1941 fullscreenUrl_ = url; |
| 1942 exclusiveAccessBubbleType_ = bubbleType; | 1942 exclusiveAccessBubbleType_ = bubbleType; |
| 1943 [self layoutSubviews]; | 1943 [self layoutSubviews]; |
| 1944 [self showFullscreenExitBubbleIfNecessary]; | 1944 [self showFullscreenExitBubbleIfNecessary]; |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 - (void)toggleFullscreenToolbar { |
| 1948 shouldHideFullscreenToolbar_ = !shouldHideFullscreenToolbar_; |
| 1949 |
| 1950 if ([self isInAppKitFullscreen]) |
| 1951 [self updateFullscreenWithToolbar:!shouldHideFullscreenToolbar_]; |
| 1952 } |
| 1953 |
| 1947 - (BOOL)isInAnyFullscreenMode { | 1954 - (BOOL)isInAnyFullscreenMode { |
| 1948 return [self isInImmersiveFullscreen] || [self isInAppKitFullscreen]; | 1955 return [self isInImmersiveFullscreen] || [self isInAppKitFullscreen]; |
| 1949 } | 1956 } |
| 1950 | 1957 |
| 1951 - (BOOL)isInImmersiveFullscreen { | 1958 - (BOOL)isInImmersiveFullscreen { |
| 1952 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_; | 1959 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_; |
| 1953 } | 1960 } |
| 1954 | 1961 |
| 1955 - (BOOL)isInAppKitFullscreen { | 1962 - (BOOL)isInAppKitFullscreen { |
| 1956 return !exitingAppKitFullscreen_ && | 1963 return !exitingAppKitFullscreen_ && |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 [self exitImmersiveFullscreen]; | 2001 [self exitImmersiveFullscreen]; |
| 1995 } | 2002 } |
| 1996 | 2003 |
| 1997 - (BOOL)inPresentationMode { | 2004 - (BOOL)inPresentationMode { |
| 1998 return presentationModeController_.get() && | 2005 return presentationModeController_.get() && |
| 1999 [presentationModeController_ inPresentationMode] && | 2006 [presentationModeController_ inPresentationMode] && |
| 2000 presentationModeController_.get().slidingStyle == | 2007 presentationModeController_.get().slidingStyle == |
| 2001 fullscreen_mac::OMNIBOX_TABS_HIDDEN; | 2008 fullscreen_mac::OMNIBOX_TABS_HIDDEN; |
| 2002 } | 2009 } |
| 2003 | 2010 |
| 2011 - (BOOL)shouldHideFullscreenToolbar { |
| 2012 return shouldHideFullscreenToolbar_; |
| 2013 } |
| 2014 |
| 2004 - (void)resizeFullscreenWindow { | 2015 - (void)resizeFullscreenWindow { |
| 2005 DCHECK([self isInAnyFullscreenMode]); | 2016 DCHECK([self isInAnyFullscreenMode]); |
| 2006 if (![self isInAnyFullscreenMode]) | 2017 if (![self isInAnyFullscreenMode]) |
| 2007 return; | 2018 return; |
| 2008 | 2019 |
| 2009 NSWindow* window = [self window]; | 2020 NSWindow* window = [self window]; |
| 2010 [window setFrame:[[window screen] frame] display:YES]; | 2021 [window setFrame:[[window screen] frame] display:YES]; |
| 2011 [self layoutSubviews]; | 2022 [self layoutSubviews]; |
| 2012 } | 2023 } |
| 2013 | 2024 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 | 2086 |
| 2076 - (BOOL)supportsBookmarkBar { | 2087 - (BOOL)supportsBookmarkBar { |
| 2077 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2088 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2078 } | 2089 } |
| 2079 | 2090 |
| 2080 - (BOOL)isTabbedWindow { | 2091 - (BOOL)isTabbedWindow { |
| 2081 return browser_->is_type_tabbed(); | 2092 return browser_->is_type_tabbed(); |
| 2082 } | 2093 } |
| 2083 | 2094 |
| 2084 @end // @implementation BrowserWindowController(WindowType) | 2095 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |