| 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 #import "chrome/browser/ui/cocoa/browser_window_layout.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_layout.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 } | 293 } |
| 294 | 294 |
| 295 // Lay out the backing bar in fullscreen mode. | 295 // Lay out the backing bar in fullscreen mode. |
| 296 if (parameters_.inAnyFullscreen) { | 296 if (parameters_.inAnyFullscreen) { |
| 297 output_.fullscreenBackingBarFrame = | 297 output_.fullscreenBackingBarFrame = |
| 298 NSMakeRect(0, maxY, width, [self fullscreenBackingBarHeight]); | 298 NSMakeRect(0, maxY, width, [self fullscreenBackingBarHeight]); |
| 299 } | 299 } |
| 300 | 300 |
| 301 // Place the find bar immediately below the toolbar/attached bookmark bar. | 301 // Place the find bar immediately below the toolbar/attached bookmark bar. |
| 302 output_.findBarMaxY = maxY; | 302 output_.findBarMaxY = maxY; |
| 303 output_.fullscreenExitButtonMaxY = maxY; | |
| 304 | 303 |
| 305 if (parameters_.inAnyFullscreen && | 304 if (parameters_.inAnyFullscreen && |
| 306 (parameters_.slidingStyle == | 305 (parameters_.slidingStyle == |
| 307 FullscreenSlidingStyle::OMNIBOX_TABS_HIDDEN || | 306 FullscreenSlidingStyle::OMNIBOX_TABS_HIDDEN || |
| 308 parameters_.slidingStyle == FullscreenSlidingStyle::OMNIBOX_TABS_NONE)) { | 307 parameters_.slidingStyle == FullscreenSlidingStyle::OMNIBOX_TABS_NONE)) { |
| 309 // If in presentation mode, reset |maxY| to top of screen, so that the | 308 // If in presentation mode, reset |maxY| to top of screen, so that the |
| 310 // floating bar slides over the things which appear to be in the content | 309 // floating bar slides over the things which appear to be in the content |
| 311 // area. | 310 // area. |
| 312 maxY = parameters_.windowSize.height; | 311 maxY = parameters_.windowSize.height; |
| 313 } | 312 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 394 |
| 396 @end | 395 @end |
| 397 | 396 |
| 398 @implementation BrowserWindowLayout (ExposedForTesting) | 397 @implementation BrowserWindowLayout (ExposedForTesting) |
| 399 | 398 |
| 400 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { | 399 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { |
| 401 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; | 400 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; |
| 402 } | 401 } |
| 403 | 402 |
| 404 @end | 403 @end |
| OLD | NEW |