| 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" |
| 11 | 11 |
| 12 namespace chrome { | 12 namespace chrome { |
| 13 | 13 |
| 14 // The height of the tab strip. | 14 // The height of the tab strip. |
| 15 extern const CGFloat kTabStripHeight; | 15 extern const CGFloat kTabStripHeight; |
| 16 | 16 |
| 17 // The parameters used to calculate the layout of the views managed by the | 17 // The parameters used to calculate the layout of the views managed by the |
| 18 // BrowserWindowController. | 18 // BrowserWindowController. |
| 19 struct LayoutParameters { | 19 struct LayoutParameters { |
| 20 // The size of the content view of the window. | 20 // The size of the content view of the window. |
| 21 NSSize contentViewSize; | 21 NSSize contentViewSize; |
| 22 // The size of the window. | 22 // The size of the window. |
| 23 NSSize windowSize; | 23 NSSize windowSize; |
| 24 | 24 |
| 25 // Whether the controller is in any fullscreen mode. This parameter should be | 25 // Whether the controller is in any fullscreen mode. This parameter should be |
| 26 // NO if the controller is in the process of entering fullscreen. | 26 // NO if the controller is in the process of entering fullscreen. |
| 27 BOOL inAnyFullscreen; | 27 BOOL inAnyFullscreen; |
| 28 // The fullscreen sliding style. See fullscreen_toolbar_controller.h for more | 28 // The fullscreen sliding style. See fullscreen_toolbar_controller.h for more |
| 29 // details. | 29 // details. |
| 30 fullscreen_mac::SlidingStyle slidingStyle; | 30 FullscreenSlidingStyle slidingStyle; |
| 31 // The minY of the AppKit Menu Bar, relative to the top of the screen. Ranges | 31 // The minY of the AppKit Menu Bar, relative to the top of the screen. Ranges |
| 32 // from 0 to -22. Only relevant in fullscreen mode. | 32 // from 0 to -22. Only relevant in fullscreen mode. |
| 33 CGFloat menubarOffset; | 33 CGFloat menubarOffset; |
| 34 // The fraction of the sliding toolbar that is visible in fullscreenm mode. | 34 // The fraction of the sliding toolbar that is visible in fullscreenm mode. |
| 35 // Ranges from 0 to 1. Only relevant in fullscreen mode. | 35 // Ranges from 0 to 1. Only relevant in fullscreen mode. |
| 36 CGFloat toolbarFraction; | 36 CGFloat toolbarFraction; |
| 37 | 37 |
| 38 BOOL hasTabStrip; | 38 BOOL hasTabStrip; |
| 39 // The frame of the fullscreen button. May be NSZeroRect if the fullscreen | 39 // The frame of the fullscreen button. May be NSZeroRect if the fullscreen |
| 40 // button doesn't exist. Only needs to be set when hasTabStrip is YES. | 40 // button doesn't exist. Only needs to be set when hasTabStrip is YES. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Performs the layout computation and returns the results. This method is fast | 141 // Performs the layout computation and returns the results. This method is fast |
| 142 // and does not perform any caching. | 142 // and does not perform any caching. |
| 143 - (chrome::LayoutOutput)computeLayout; | 143 - (chrome::LayoutOutput)computeLayout; |
| 144 | 144 |
| 145 - (void)setContentViewSize:(NSSize)size; | 145 - (void)setContentViewSize:(NSSize)size; |
| 146 - (void)setWindowSize:(NSSize)size; | 146 - (void)setWindowSize:(NSSize)size; |
| 147 | 147 |
| 148 // Whether the controller is in any fullscreen mode. |inAnyFullscreen| should | 148 // Whether the controller is in any fullscreen mode. |inAnyFullscreen| should |
| 149 // be NO if the controller is in the process of entering fullscreen. | 149 // be NO if the controller is in the process of entering fullscreen. |
| 150 - (void)setInAnyFullscreen:(BOOL)inAnyFullscreen; | 150 - (void)setInAnyFullscreen:(BOOL)inAnyFullscreen; |
| 151 - (void)setFullscreenSlidingStyle:(fullscreen_mac::SlidingStyle)slidingStyle; | 151 - (void)setSlidingStyle:(FullscreenSlidingStyle)slidingStyle; |
| 152 - (void)setFullscreenMenubarOffset:(CGFloat)menubarOffset; | 152 - (void)setFullscreenMenubarOffset:(CGFloat)menubarOffset; |
| 153 - (void)setFullscreenToolbarFraction:(CGFloat)toolbarFraction; | 153 - (void)setFullscreenToolbarFraction:(CGFloat)toolbarFraction; |
| 154 | 154 |
| 155 - (void)setHasTabStrip:(BOOL)hasTabStrip; | 155 - (void)setHasTabStrip:(BOOL)hasTabStrip; |
| 156 - (void)setFullscreenButtonFrame:(NSRect)frame; | 156 - (void)setFullscreenButtonFrame:(NSRect)frame; |
| 157 - (void)setShouldShowAvatar:(BOOL)shouldShowAvatar; | 157 - (void)setShouldShowAvatar:(BOOL)shouldShowAvatar; |
| 158 - (void)setShouldUseNewAvatar:(BOOL)shouldUseNewAvatar; | 158 - (void)setShouldUseNewAvatar:(BOOL)shouldUseNewAvatar; |
| 159 - (void)setAvatarSize:(NSSize)avatarSize; | 159 - (void)setAvatarSize:(NSSize)avatarSize; |
| 160 - (void)setAvatarLineWidth:(CGFloat)avatarLineWidth; | 160 - (void)setAvatarLineWidth:(CGFloat)avatarLineWidth; |
| 161 | 161 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 174 | 174 |
| 175 - (void)setHasDownloadShelf:(BOOL)hasDownloadShelf; | 175 - (void)setHasDownloadShelf:(BOOL)hasDownloadShelf; |
| 176 - (void)setDownloadShelfHeight:(CGFloat)downloadShelfHeight; | 176 - (void)setDownloadShelfHeight:(CGFloat)downloadShelfHeight; |
| 177 @end | 177 @end |
| 178 | 178 |
| 179 @interface BrowserWindowLayout (ExposedForTesting) | 179 @interface BrowserWindowLayout (ExposedForTesting) |
| 180 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater; | 180 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater; |
| 181 @end | 181 @end |
| 182 | 182 |
| 183 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ | 183 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_LAYOUT_H_ |
| OLD | NEW |