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

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

Issue 255101: Mac: Find bar should be drawn on top of all other toolbars. (Closed)
Patch Set: Created 11 years, 2 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
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 initWithBrowser:browser_.get() 195 initWithBrowser:browser_.get()
196 initialWidth:NSWidth([[[self window] contentView] frame]) 196 initialWidth:NSWidth([[[self window] contentView] frame])
197 compressDelegate:toolbarController_.get() 197 compressDelegate:toolbarController_.get()
198 resizeDelegate:self 198 resizeDelegate:self
199 urlDelegate:self]); 199 urlDelegate:self]);
200 200
201 // Add bookmark bar to the view hierarchy. This also triggers the 201 // Add bookmark bar to the view hierarchy. This also triggers the
202 // nib load. The bookmark bar is defined (in the nib) to be 202 // nib load. The bookmark bar is defined (in the nib) to be
203 // bottom-aligned to it's parent view (among other things), so 203 // bottom-aligned to it's parent view (among other things), so
204 // position and resize properties don't need to be set. 204 // position and resize properties don't need to be set.
205 [[[self window] contentView] addSubview:[bookmarkBarController_ view]]; 205 [[[self window] contentView] addSubview:[bookmarkBarController_ view]
John Grabowski 2009/10/07 04:56:50 Add comment explaining why (e.g. "so find bar is a
206 positioned:NSWindowBelow
207 relativeTo:[toolbarController_ view]];
206 208
207 // We don't want to try and show the bar before it gets placed in 209 // We don't want to try and show the bar before it gets placed in
208 // it's parent view, so this step shoudn't be inside the bookmark 210 // it's parent view, so this step shoudn't be inside the bookmark
209 // bar controller's awakeFromNib. 211 // bar controller's awakeFromNib.
210 [bookmarkBarController_ showIfNeeded]; 212 [bookmarkBarController_ showIfNeeded];
211 213
212 if (browser_->SupportsWindowFeature(Browser::FEATURE_EXTENSIONSHELF)) { 214 if (browser_->SupportsWindowFeature(Browser::FEATURE_EXTENSIONSHELF)) {
213 // Create the extension shelf. 215 // Create the extension shelf.
214 extensionShelfController_.reset([[ExtensionShelfController alloc] 216 extensionShelfController_.reset([[ExtensionShelfController alloc]
215 initWithBrowser:browser_.get() 217 initWithBrowser:browser_.get()
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); 1456 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR);
1455 [theme setValue:toolbarBackgroundColor 1457 [theme setValue:toolbarBackgroundColor
1456 forAttribute:@"backgroundColor" 1458 forAttribute:@"backgroundColor"
1457 style:GTMThemeStyleToolBar 1459 style:GTMThemeStyleToolBar
1458 state:GTMThemeStateActiveWindow]; 1460 state:GTMThemeStateActiveWindow];
1459 1461
1460 return theme; 1462 return theme;
1461 } 1463 }
1462 @end 1464 @end
1463 1465
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698