Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(869)

Side by Side Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 160496: Implement back/forward toolbar menus on Mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/back_forward_menu_controller.mm ('k') | chrome/browser/cocoa/clickhold_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698