Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller_private.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/mac/bind_objc_block.h" | 10 #include "base/mac/bind_objc_block.h" |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 900 [layout setFullscreenButtonFrame:[self fullscreenButtonFrame]]; | 900 [layout setFullscreenButtonFrame:[self fullscreenButtonFrame]]; |
| 901 | 901 |
| 902 if ([self shouldShowAvatar]) { | 902 if ([self shouldShowAvatar]) { |
| 903 NSView* avatar = [avatarButtonController_ view]; | 903 NSView* avatar = [avatarButtonController_ view]; |
| 904 [layout setShouldShowAvatar:YES]; | 904 [layout setShouldShowAvatar:YES]; |
| 905 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]]; | 905 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]]; |
| 906 [layout setAvatarSize:[avatar frame].size]; | 906 [layout setAvatarSize:[avatar frame].size]; |
| 907 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]]; | 907 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]]; |
| 908 } | 908 } |
| 909 | 909 |
| 910 // Set whether the toolbar view is visible or not. For hosted apps in windows, | |
| 911 // [self hasToolbar] returns NO, but [self hasLocationBar] returns YES; | |
| 912 // however, hosted apps can independently control whether they show or hide | |
| 913 // the location bar based on the current origin. Hosted app windows do not | |
| 914 // show the bookmark bar, so this does not interfere with the positioning of | |
| 915 // that bar. | |
| 916 [layout setToolbarHidden:[toolbarController_ view].isHidden]; | |
|
tapted
2015/10/12 23:56:43
use [[toolbarController_ view] isHidden] (dot not
dominickn
2015/10/15 06:22:27
Changes removed
| |
| 910 [layout setHasToolbar:[self hasToolbar]]; | 917 [layout setHasToolbar:[self hasToolbar]]; |
| 911 [layout setToolbarHeight:NSHeight([[toolbarController_ view] bounds])]; | 918 [layout setToolbarHeight:NSHeight([[toolbarController_ view] bounds])]; |
| 912 | 919 |
| 913 [layout setHasLocationBar:[self hasLocationBar]]; | 920 [layout setHasLocationBar:[self hasLocationBar]]; |
| 914 | 921 |
| 915 [layout setPlaceBookmarkBarBelowInfoBar:[self placeBookmarkBarBelowInfoBar]]; | 922 [layout setPlaceBookmarkBarBelowInfoBar:[self placeBookmarkBarBelowInfoBar]]; |
| 916 [layout setBookmarkBarHidden:[bookmarkBarController_ view].isHidden]; | 923 [layout setBookmarkBarHidden:[bookmarkBarController_ view].isHidden]; |
| 917 [layout setBookmarkBarHeight: | 924 [layout setBookmarkBarHeight: |
| 918 NSHeight([[bookmarkBarController_ view] bounds])]; | 925 NSHeight([[bookmarkBarController_ view] bounds])]; |
| 919 | 926 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1157 return browser_->tab_strip_model()->GetActiveWebContents(); | 1164 return browser_->tab_strip_model()->GetActiveWebContents(); |
| 1158 } | 1165 } |
| 1159 | 1166 |
| 1160 - (PermissionBubbleManager*)permissionBubbleManager { | 1167 - (PermissionBubbleManager*)permissionBubbleManager { |
| 1161 if (WebContents* contents = [self webContents]) | 1168 if (WebContents* contents = [self webContents]) |
| 1162 return PermissionBubbleManager::FromWebContents(contents); | 1169 return PermissionBubbleManager::FromWebContents(contents); |
| 1163 return nil; | 1170 return nil; |
| 1164 } | 1171 } |
| 1165 | 1172 |
| 1166 @end // @implementation BrowserWindowController(Private) | 1173 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |