| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h" | 10 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // BrowserWindowController. | 22 // BrowserWindowController. |
| 23 struct LayoutParameters { | 23 struct LayoutParameters { |
| 24 // The size of the content view of the window. | 24 // The size of the content view of the window. |
| 25 NSSize contentViewSize; | 25 NSSize contentViewSize; |
| 26 // The size of the window. | 26 // The size of the window. |
| 27 NSSize windowSize; | 27 NSSize windowSize; |
| 28 | 28 |
| 29 // Whether the controller is in any fullscreen mode. This parameter should be | 29 // Whether the controller is in any fullscreen mode. This parameter should be |
| 30 // NO if the controller is in the process of entering fullscreen. | 30 // NO if the controller is in the process of entering fullscreen. |
| 31 BOOL inAnyFullscreen; | 31 BOOL inAnyFullscreen; |
| 32 // The fullscreen sliding style. See fullscreen_toolbar_controller.h for more | 32 // The fullscreen toolbar style. See fullscreen_toolbar_controller.h for more |
| 33 // details. | 33 // details. |
| 34 FullscreenSlidingStyle slidingStyle; | 34 FullscreenToolbarStyle toolbarStyle; |
| 35 // The minY of the AppKit Menu Bar, relative to the top of the screen. Ranges | 35 // The minY of the AppKit Menu Bar, relative to the top of the screen. Ranges |
| 36 // from 0 to -22. Only relevant in fullscreen mode. | 36 // from 0 to -22. Only relevant in fullscreen mode. |
| 37 CGFloat menubarOffset; | 37 CGFloat menubarOffset; |
| 38 // The fraction of the sliding toolbar that is visible in fullscreenm mode. | 38 // The fraction of the toolbar that is visible in fullscreen mode. |
| 39 // Ranges from 0 to 1. Only relevant in fullscreen mode. | 39 // Ranges from 0 to 1. Only relevant in fullscreen mode. |
| 40 CGFloat toolbarFraction; | 40 CGFloat toolbarFraction; |
| 41 | 41 |
| 42 BOOL hasTabStrip; | 42 BOOL hasTabStrip; |
| 43 // The frame of the fullscreen button. May be NSZeroRect if the fullscreen | 43 // The frame of the fullscreen button. May be NSZeroRect if the fullscreen |
| 44 // button doesn't exist. Only needs to be set when hasTabStrip is YES. | 44 // button doesn't exist. Only needs to be set when hasTabStrip is YES. |
| 45 NSRect fullscreenButtonFrame; | 45 NSRect fullscreenButtonFrame; |
| 46 // Whether the avatar button should be shown. Only needs to be set when | 46 // Whether the avatar button should be shown. Only needs to be set when |
| 47 // hasTabStrip is YES. | 47 // hasTabStrip is YES. |
| 48 BOOL shouldShowAvatar; | 48 BOOL shouldShowAvatar; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Performs the layout computation and returns the results. This method is fast | 144 // Performs the layout computation and returns the results. This method is fast |
| 145 // and does not perform any caching. | 145 // and does not perform any caching. |
| 146 - (chrome::LayoutOutput)computeLayout; | 146 - (chrome::LayoutOutput)computeLayout; |
| 147 | 147 |
| 148 - (void)setContentViewSize:(NSSize)size; | 148 - (void)setContentViewSize:(NSSize)size; |
| 149 - (void)setWindowSize:(NSSize)size; | 149 - (void)setWindowSize:(NSSize)size; |
| 150 | 150 |
| 151 // Whether the controller is in any fullscreen mode. |inAnyFullscreen| should | 151 // Whether the controller is in any fullscreen mode. |inAnyFullscreen| should |
| 152 // be NO if the controller is in the process of entering fullscreen. | 152 // be NO if the controller is in the process of entering fullscreen. |
| 153 - (void)setInAnyFullscreen:(BOOL)inAnyFullscreen; | 153 - (void)setInAnyFullscreen:(BOOL)inAnyFullscreen; |
| 154 - (void)setSlidingStyle:(FullscreenSlidingStyle)slidingStyle; | 154 - (void)setFullscreenToolbarStyle:(FullscreenToolbarStyle)toolbarStyle; |
| 155 - (void)setFullscreenMenubarOffset:(CGFloat)menubarOffset; | 155 - (void)setFullscreenMenubarOffset:(CGFloat)menubarOffset; |
| 156 - (void)setFullscreenToolbarFraction:(CGFloat)toolbarFraction; | 156 - (void)setFullscreenToolbarFraction:(CGFloat)toolbarFraction; |
| 157 | 157 |
| 158 - (void)setHasTabStrip:(BOOL)hasTabStrip; | 158 - (void)setHasTabStrip:(BOOL)hasTabStrip; |
| 159 - (void)setFullscreenButtonFrame:(NSRect)frame; | 159 - (void)setFullscreenButtonFrame:(NSRect)frame; |
| 160 - (void)setShouldShowAvatar:(BOOL)shouldShowAvatar; | 160 - (void)setShouldShowAvatar:(BOOL)shouldShowAvatar; |
| 161 - (void)setShouldUseNewAvatar:(BOOL)shouldUseNewAvatar; | 161 - (void)setShouldUseNewAvatar:(BOOL)shouldUseNewAvatar; |
| 162 - (void)setAvatarSize:(NSSize)avatarSize; | 162 - (void)setAvatarSize:(NSSize)avatarSize; |
| 163 - (void)setAvatarLineWidth:(CGFloat)avatarLineWidth; | 163 - (void)setAvatarLineWidth:(CGFloat)avatarLineWidth; |
| 164 | 164 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 177 | 177 |
| 178 - (void)setHasDownloadShelf:(BOOL)hasDownloadShelf; | 178 - (void)setHasDownloadShelf:(BOOL)hasDownloadShelf; |
| 179 - (void)setDownloadShelfHeight:(CGFloat)downloadShelfHeight; | 179 - (void)setDownloadShelfHeight:(CGFloat)downloadShelfHeight; |
| 180 @end | 180 @end |
| 181 | 181 |
| 182 @interface BrowserWindowLayout (ExposedForTesting) | 182 @interface BrowserWindowLayout (ExposedForTesting) |
| 183 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater; | 183 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater; |
| 184 @end | 184 @end |
| 185 | 185 |
| 186 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ | 186 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ |
| OLD | NEW |