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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Computes the height of the backing bar for the views in the omnibox area in | 54 // Computes the height of the backing bar for the views in the omnibox area in |
55 // fullscreen mode. | 55 // fullscreen mode. |
56 - (CGFloat)fullscreenBackingBarHeight; | 56 - (CGFloat)fullscreenBackingBarHeight; |
57 | 57 |
58 @end | 58 @end |
59 | 59 |
60 @implementation BrowserWindowLayout | 60 @implementation BrowserWindowLayout |
61 | 61 |
62 - (instancetype)init { | 62 - (instancetype)init { |
63 if ((self = [super init])) { | 63 if ((self = [super init])) { |
64 parameters_.isOSYosemiteOrLater = base::mac::IsOSYosemiteOrLater(); | 64 parameters_.isOSYosemiteOrLater = base::mac::IsAtLeastOS10_10(); |
65 } | 65 } |
66 return self; | 66 return self; |
67 } | 67 } |
68 | 68 |
69 - (chrome::LayoutOutput)computeLayout { | 69 - (chrome::LayoutOutput)computeLayout { |
70 memset(&output_, 0, sizeof(chrome::LayoutOutput)); | 70 memset(&output_, 0, sizeof(chrome::LayoutOutput)); |
71 | 71 |
72 [self computeFullscreenYOffset]; | 72 [self computeFullscreenYOffset]; |
73 [self computeTabStripLayout]; | 73 [self computeTabStripLayout]; |
74 [self computeContentViewLayout]; | 74 [self computeContentViewLayout]; |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 @end | 387 @end |
388 | 388 |
389 @implementation BrowserWindowLayout (ExposedForTesting) | 389 @implementation BrowserWindowLayout (ExposedForTesting) |
390 | 390 |
391 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { | 391 - (void)setOSYosemiteOrLater:(BOOL)osYosemiteOrLater { |
392 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; | 392 parameters_.isOSYosemiteOrLater = osYosemiteOrLater; |
393 } | 393 } |
394 | 394 |
395 @end | 395 @end |
OLD | NEW |