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

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

Issue 645643004: mac: Fix a logic error in presentation_mode_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/presentation_mode_controller.h" 5 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #import "base/mac/mac_util.h" 10 #import "base/mac/mac_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // Stops any running animations, removes tracking areas, etc. 174 // Stops any running animations, removes tracking areas, etc.
175 - (void)cleanup; 175 - (void)cleanup;
176 176
177 // Shows and hides the UI associated with this window being active (having main 177 // Shows and hides the UI associated with this window being active (having main
178 // status). This includes hiding the menu bar. These functions are called when 178 // status). This includes hiding the menu bar. These functions are called when
179 // the window gains or loses main status as well as in |-cleanup|. 179 // the window gains or loses main status as well as in |-cleanup|.
180 - (void)showActiveWindowUI; 180 - (void)showActiveWindowUI;
181 - (void)hideActiveWindowUI; 181 - (void)hideActiveWindowUI;
182 182
183 // In Immersive Fullscreen, the menubar is visible iff. toolbarFraction_ >= 183 // Whether the menu bar should be shown in immersive fullscreen for the screen
184 // 1.0. 184 // that contains the window.
185 - (BOOL)shouldShowMenubarInImmersiveFullscreen; 185 - (BOOL)shouldShowMenubarInImmersiveFullscreen;
186 186
187 @end 187 @end
188 188
189 189
190 @implementation PresentationModeController 190 @implementation PresentationModeController
191 191
192 @synthesize inPresentationMode = inPresentationMode_; 192 @synthesize inPresentationMode = inPresentationMode_;
193 @synthesize slidingStyle = slidingStyle_; 193 @synthesize slidingStyle = slidingStyle_;
194 @synthesize toolbarFraction = toolbarFraction_; 194 @synthesize toolbarFraction = toolbarFraction_;
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 // TODO(rohitrao): Insert the Exit Fullscreen button. http://crbug.com/35956 738 // TODO(rohitrao): Insert the Exit Fullscreen button. http://crbug.com/35956
739 } 739 }
740 740
741 - (void)hideActiveWindowUI { 741 - (void)hideActiveWindowUI {
742 [self updateMenuBarAndDockVisibility]; 742 [self updateMenuBarAndDockVisibility];
743 743
744 // TODO(rohitrao): Remove the Exit Fullscreen button. http://crbug.com/35956 744 // TODO(rohitrao): Remove the Exit Fullscreen button. http://crbug.com/35956
745 } 745 }
746 746
747 - (BOOL)shouldShowMenubarInImmersiveFullscreen { 747 - (BOOL)shouldShowMenubarInImmersiveFullscreen {
748 return toolbarFraction_ >= 1.0; 748 return [self doesScreenHaveMenuBar] && toolbarFraction_ > 0.99;
749 } 749 }
750 750
751 @end 751 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698