| OLD | NEW |
| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 name:NSApplicationDidHideNotification | 294 name:NSApplicationDidHideNotification |
| 295 object:nil]; | 295 object:nil]; |
| 296 [[NSNotificationCenter defaultCenter] | 296 [[NSNotificationCenter defaultCenter] |
| 297 addObserver:self | 297 addObserver:self |
| 298 selector:@selector(applicationDidUnhide:) | 298 selector:@selector(applicationDidUnhide:) |
| 299 name:NSApplicationDidUnhideNotification | 299 name:NSApplicationDidUnhideNotification |
| 300 object:nil]; | 300 object:nil]; |
| 301 | 301 |
| 302 // This must be done after the view is added to the window since it relies | 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. | 303 // on the window bounds to determine whether to show buttons or not. |
| 304 [toolbarController_ createBrowserActionButtons]; | 304 if ([self hasToolbar]) // Do not create the buttons in popups. |
| 305 [toolbarController_ createBrowserActionButtons]; |
| 305 | 306 |
| 306 // We are done initializing now. | 307 // We are done initializing now. |
| 307 initializing_ = NO; | 308 initializing_ = NO; |
| 308 } | 309 } |
| 309 return self; | 310 return self; |
| 310 } | 311 } |
| 311 | 312 |
| 312 - (void)dealloc { | 313 - (void)dealloc { |
| 313 browser_->CloseAllTabs(); | 314 browser_->CloseAllTabs(); |
| 314 [downloadShelfController_ exiting]; | 315 [downloadShelfController_ exiting]; |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 | 1814 |
| 1814 - (BOOL)supportsBookmarkBar { | 1815 - (BOOL)supportsBookmarkBar { |
| 1815 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 1816 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 1816 } | 1817 } |
| 1817 | 1818 |
| 1818 - (BOOL)isNormalWindow { | 1819 - (BOOL)isNormalWindow { |
| 1819 return browser_->type() == Browser::TYPE_NORMAL; | 1820 return browser_->type() == Browser::TYPE_NORMAL; |
| 1820 } | 1821 } |
| 1821 | 1822 |
| 1822 @end // @implementation BrowserWindowController(WindowType) | 1823 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |