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

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

Issue 607603003: Mac: Minor fullscreen adjustments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presentation mode unit test. Created 6 years, 2 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
OLDNEW
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 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 - (BOOL)isInImmersiveFullscreen { 2090 - (BOOL)isInImmersiveFullscreen {
2091 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_; 2091 return fullscreenWindow_.get() != nil || enteringImmersiveFullscreen_;
2092 } 2092 }
2093 2093
2094 - (BOOL)isInAppKitFullscreen { 2094 - (BOOL)isInAppKitFullscreen {
2095 return ([[self window] styleMask] & NSFullScreenWindowMask) == 2095 return ([[self window] styleMask] & NSFullScreenWindowMask) ==
2096 NSFullScreenWindowMask || 2096 NSFullScreenWindowMask ||
2097 enteringAppKitFullscreen_; 2097 enteringAppKitFullscreen_;
2098 } 2098 }
2099 2099
2100 - (BOOL)isInFullscreenWithOmniboxSliding {
2101 return presentationModeController_.get() != nil;
2102 }
2103
2104 - (void)enterPresentationMode { 2100 - (void)enterPresentationMode {
2105 if (!chrome::mac::SupportsSystemFullscreen()) { 2101 if (!chrome::mac::SupportsSystemFullscreen()) {
2106 [self enterImmersiveFullscreen]; 2102 [self enterImmersiveFullscreen];
2107 return; 2103 return;
2108 } 2104 }
2109 2105
2110 if ([self isInAppKitFullscreen]) { 2106 if ([self isInAppKitFullscreen]) {
2111 // Already in AppKit Fullscreen. Adjust the UI to use Presentation Mode. 2107 // Already in AppKit Fullscreen. Adjust the UI to use Presentation Mode.
2112 [self 2108 [self
2113 adjustUIForSlidingFullscreenStyle:fullscreen_mac::OMNIBOX_TABS_HIDDEN]; 2109 adjustUIForSlidingFullscreenStyle:fullscreen_mac::OMNIBOX_TABS_HIDDEN];
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 2225
2230 - (BOOL)supportsBookmarkBar { 2226 - (BOOL)supportsBookmarkBar {
2231 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2227 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2232 } 2228 }
2233 2229
2234 - (BOOL)isTabbedWindow { 2230 - (BOOL)isTabbedWindow {
2235 return browser_->is_type_tabbed(); 2231 return browser_->is_type_tabbed();
2236 } 2232 }
2237 2233
2238 @end // @implementation BrowserWindowController(WindowType) 2234 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698