| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
| 8 #include "base/scoped_nsdisable_screen_updates.h" | 8 #include "base/scoped_nsdisable_screen_updates.h" |
| 9 #import "base/scoped_nsobject.h" | 9 #import "base/scoped_nsobject.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 resizeDelegate:self]); | 167 resizeDelegate:self]); |
| 168 [[[self window] contentView] addSubview:[infoBarContainerController_ view]]; | 168 [[[self window] contentView] addSubview:[infoBarContainerController_ view]]; |
| 169 | 169 |
| 170 // Create a controller for the toolbar, giving it the toolbar model object | 170 // Create a controller for the toolbar, giving it the toolbar model object |
| 171 // and the toolbar view from the nib. The controller will handle | 171 // and the toolbar view from the nib. The controller will handle |
| 172 // registering for the appropriate command state changes from the back-end. | 172 // registering for the appropriate command state changes from the back-end. |
| 173 toolbarController_.reset([[ToolbarController alloc] | 173 toolbarController_.reset([[ToolbarController alloc] |
| 174 initWithModel:browser->toolbar_model() | 174 initWithModel:browser->toolbar_model() |
| 175 commands:browser->command_updater() | 175 commands:browser->command_updater() |
| 176 profile:browser->profile() | 176 profile:browser->profile() |
| 177 browser:browser |
| 177 resizeDelegate:self | 178 resizeDelegate:self |
| 178 bookmarkDelegate:self]); | 179 bookmarkDelegate:self]); |
| 179 // If we are a pop-up, we have a titlebar and no toolbar. | 180 // If we are a pop-up, we have a titlebar and no toolbar. |
| 180 if (!browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) && | 181 if (!browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) && |
| 181 browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR)) { | 182 browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR)) { |
| 182 [toolbarController_ setHasToolbar:NO]; | 183 [toolbarController_ setHasToolbar:NO]; |
| 183 } | 184 } |
| 184 [[[self window] contentView] addSubview:[toolbarController_ view]]; | 185 [[[self window] contentView] addSubview:[toolbarController_ view]]; |
| 185 | 186 |
| 186 [self fixWindowGradient]; | 187 [self fixWindowGradient]; |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; | 1174 NSColor* toolbarButtonBorderColor = toolbarButtonIconColor; |
| 1174 [theme setValue:toolbarButtonBorderColor | 1175 [theme setValue:toolbarButtonBorderColor |
| 1175 forAttribute:@"borderColor" | 1176 forAttribute:@"borderColor" |
| 1176 style:GTMThemeStyleToolBar | 1177 style:GTMThemeStyleToolBar |
| 1177 state:YES]; | 1178 state:YES]; |
| 1178 | 1179 |
| 1179 return theme; | 1180 return theme; |
| 1180 } | 1181 } |
| 1181 @end | 1182 @end |
| 1182 | 1183 |
| OLD | NEW |