Chromium Code Reviews| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 | 258 |
| 259 output_.tabStripLayout = layout; | 259 output_.tabStripLayout = layout; |
| 260 } | 260 } |
| 261 | 261 |
| 262 - (void)computeContentViewLayout { | 262 - (void)computeContentViewLayout { |
| 263 chrome::LayoutParameters parameters = parameters_; | 263 chrome::LayoutParameters parameters = parameters_; |
| 264 CGFloat maxY = maxY_; | 264 CGFloat maxY = maxY_; |
| 265 | 265 |
| 266 // Sanity-check |maxY|. | 266 // Sanity-check |maxY|. |
| 267 DCHECK_GE(maxY, 0); | 267 DCHECK_GE(maxY, 0); |
| 268 DCHECK_LE(maxY, parameters_.contentViewSize.height + fullscreenYOffset_); | 268 // DCHECK_LE(maxY, parameters_.contentViewSize.height + fullscreenYOffset_); |
|
erikchen
2015/08/10 18:06:25
huh?
spqchan1
2015/08/11 21:43:48
Removed this.
| |
| 269 | 269 |
| 270 CGFloat width = parameters_.contentViewSize.width; | 270 CGFloat width = parameters_.contentViewSize.width; |
| 271 | 271 |
| 272 // Lay out the toolbar. | 272 // Lay out the toolbar. |
| 273 if (parameters.hasToolbar) { | 273 if (parameters.hasToolbar) { |
| 274 output_.toolbarFrame = NSMakeRect( | 274 output_.toolbarFrame = NSMakeRect( |
| 275 0, maxY - parameters_.toolbarHeight, width, parameters_.toolbarHeight); | 275 0, maxY - parameters_.toolbarHeight, width, parameters_.toolbarHeight); |
| 276 maxY = NSMinY(output_.toolbarFrame); | 276 maxY = NSMinY(output_.toolbarFrame); |
| 277 } else if (parameters_.hasLocationBar) { | 277 } else if (parameters_.hasLocationBar) { |
| 278 CGFloat toolbarX = kLocBarLeftRightInset; | 278 CGFloat toolbarX = kLocBarLeftRightInset; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 | 393 |
| 394 @end | 394 @end |
| 395 | 395 |
| 396 @implementation BrowserWindowLayout (ExposedForTesting) | 396 @implementation BrowserWindowLayout (ExposedForTesting) |
| 397 | 397 |
| 398 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { | 398 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { |
| 399 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; | 399 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; |
| 400 } | 400 } |
| 401 | 401 |
| 402 @end | 402 @end |
| OLD | NEW |