| 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 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2144 | 2144 |
| 2145 - (BOOL)isInAnyFullscreenMode { | 2145 - (BOOL)isInAnyFullscreenMode { |
| 2146 return [self isInImmersiveFullscreen] || [self isInAppKitFullscreen]; | 2146 return [self isInImmersiveFullscreen] || [self isInAppKitFullscreen]; |
| 2147 } | 2147 } |
| 2148 | 2148 |
| 2149 - (BOOL)isInImmersiveFullscreen { | 2149 - (BOOL)isInImmersiveFullscreen { |
| 2150 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_; | 2150 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_; |
| 2151 } | 2151 } |
| 2152 | 2152 |
| 2153 - (BOOL)isInAppKitFullscreen { | 2153 - (BOOL)isInAppKitFullscreen { |
| 2154 return ([[self window] styleMask] & NSFullScreenWindowMask) == | 2154 return !exitingAppKitFullscreen_ && |
| 2155 NSFullScreenWindowMask || | 2155 (([[self window] styleMask] & NSFullScreenWindowMask) == |
| 2156 enteringAppKitFullscreen_; | 2156 NSFullScreenWindowMask || |
| 2157 enteringAppKitFullscreen_); |
| 2157 } | 2158 } |
| 2158 | 2159 |
| 2159 - (void)enterExtensionFullscreenForURL:(const GURL&)url | 2160 - (void)enterExtensionFullscreenForURL:(const GURL&)url |
| 2160 bubbleType:(ExclusiveAccessBubbleType)bubbleType { | 2161 bubbleType:(ExclusiveAccessBubbleType)bubbleType { |
| 2161 if (chrome::mac::SupportsSystemFullscreen()) { | 2162 if (chrome::mac::SupportsSystemFullscreen()) { |
| 2162 fullscreenUrl_ = url; | 2163 fullscreenUrl_ = url; |
| 2163 exclusiveAccessBubbleType_ = bubbleType; | 2164 exclusiveAccessBubbleType_ = bubbleType; |
| 2164 [self enterBrowserFullscreenWithToolbar:NO]; | 2165 [self enterBrowserFullscreenWithToolbar:NO]; |
| 2165 } else { | 2166 } else { |
| 2166 [self enterImmersiveFullscreen]; | 2167 [self enterImmersiveFullscreen]; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 | 2267 |
| 2267 - (BOOL)supportsBookmarkBar { | 2268 - (BOOL)supportsBookmarkBar { |
| 2268 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2269 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2269 } | 2270 } |
| 2270 | 2271 |
| 2271 - (BOOL)isTabbedWindow { | 2272 - (BOOL)isTabbedWindow { |
| 2272 return browser_->is_type_tabbed(); | 2273 return browser_->is_type_tabbed(); |
| 2273 } | 2274 } |
| 2274 | 2275 |
| 2275 @end // @implementation BrowserWindowController(WindowType) | 2276 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |