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

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

Issue 811002: Merge 41114 - [Mac] More progress towards resizing the Browser Actions contai... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/342/src/
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/cocoa/extension_installed_bubble_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/browser_window_controller.h" 5 #import "chrome/browser/cocoa/browser_window_controller.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "app/l10n_util_mac.h" 9 #include "app/l10n_util_mac.h"
10 #include "base/mac_util.h" 10 #include "base/mac_util.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 toolbarController_.reset([[ToolbarController alloc] 249 toolbarController_.reset([[ToolbarController alloc]
250 initWithModel:browser->toolbar_model() 250 initWithModel:browser->toolbar_model()
251 commands:browser->command_updater() 251 commands:browser->command_updater()
252 profile:browser->profile() 252 profile:browser->profile()
253 browser:browser 253 browser:browser
254 resizeDelegate:self]); 254 resizeDelegate:self]);
255 [toolbarController_ setHasToolbar:[self hasToolbar] 255 [toolbarController_ setHasToolbar:[self hasToolbar]
256 hasLocationBar:[self hasLocationBar]]; 256 hasLocationBar:[self hasLocationBar]];
257 [[[self window] contentView] addSubview:[toolbarController_ view]]; 257 [[[self window] contentView] addSubview:[toolbarController_ view]];
258 258
259 // This must be done after the view is added to the window since it relies
260 // on the window bounds to determine whether to show buttons or not.
261 [toolbarController_ createBrowserActionButtons];
262
263 // Create a sub-controller for the bookmark bar. 259 // Create a sub-controller for the bookmark bar.
264 bookmarkBarController_.reset( 260 bookmarkBarController_.reset(
265 [[BookmarkBarController alloc] 261 [[BookmarkBarController alloc]
266 initWithBrowser:browser_.get() 262 initWithBrowser:browser_.get()
267 initialWidth:NSWidth([[[self window] contentView] frame]) 263 initialWidth:NSWidth([[[self window] contentView] frame])
268 delegate:self 264 delegate:self
269 resizeDelegate:self]); 265 resizeDelegate:self]);
270 266
271 // Add bookmark bar to the view hierarchy, which also triggers the nib load. 267 // Add bookmark bar to the view hierarchy, which also triggers the nib load.
272 // The bookmark bar is defined (in the nib) to be bottom-aligned to its 268 // The bookmark bar is defined (in the nib) to be bottom-aligned to its
(...skipping 23 matching lines...) Expand all
296 addObserver:self 292 addObserver:self
297 selector:@selector(applicationDidHide:) 293 selector:@selector(applicationDidHide:)
298 name:NSApplicationDidHideNotification 294 name:NSApplicationDidHideNotification
299 object:nil]; 295 object:nil];
300 [[NSNotificationCenter defaultCenter] 296 [[NSNotificationCenter defaultCenter]
301 addObserver:self 297 addObserver:self
302 selector:@selector(applicationDidUnhide:) 298 selector:@selector(applicationDidUnhide:)
303 name:NSApplicationDidUnhideNotification 299 name:NSApplicationDidUnhideNotification
304 object:nil]; 300 object:nil];
305 301
302 // This must be done after the view is added to the window since it relies
303 // on the window bounds to determine whether to show buttons or not.
304 [toolbarController_ createBrowserActionButtons];
305
306 // We are done initializing now. 306 // We are done initializing now.
307 initializing_ = NO; 307 initializing_ = NO;
308 } 308 }
309 return self; 309 return self;
310 } 310 }
311 311
312 - (void)dealloc { 312 - (void)dealloc {
313 browser_->CloseAllTabs(); 313 browser_->CloseAllTabs();
314 [downloadShelfController_ exiting]; 314 [downloadShelfController_ exiting];
315 315
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 1795
1796 - (BOOL)supportsBookmarkBar { 1796 - (BOOL)supportsBookmarkBar {
1797 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 1797 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
1798 } 1798 }
1799 1799
1800 - (BOOL)isNormalWindow { 1800 - (BOOL)isNormalWindow {
1801 return browser_->type() == Browser::TYPE_NORMAL; 1801 return browser_->type() == Browser::TYPE_NORMAL;
1802 } 1802 }
1803 1803
1804 @end // @implementation BrowserWindowController(WindowType) 1804 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/extension_installed_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698