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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 name:NSApplicationDidHideNotification | 292 name:NSApplicationDidHideNotification |
293 object:nil]; | 293 object:nil]; |
294 [[NSNotificationCenter defaultCenter] | 294 [[NSNotificationCenter defaultCenter] |
295 addObserver:self | 295 addObserver:self |
296 selector:@selector(applicationDidUnhide:) | 296 selector:@selector(applicationDidUnhide:) |
297 name:NSApplicationDidUnhideNotification | 297 name:NSApplicationDidUnhideNotification |
298 object:nil]; | 298 object:nil]; |
299 | 299 |
300 // This must be done after the view is added to the window since it relies | 300 // This must be done after the view is added to the window since it relies |
301 // on the window bounds to determine whether to show buttons or not. | 301 // on the window bounds to determine whether to show buttons or not. |
302 [toolbarController_ createBrowserActionButtons]; | 302 if ([self hasToolbar]) // Do not create the buttons in popups. |
| 303 [toolbarController_ createBrowserActionButtons]; |
303 | 304 |
304 // We are done initializing now. | 305 // We are done initializing now. |
305 initializing_ = NO; | 306 initializing_ = NO; |
306 } | 307 } |
307 return self; | 308 return self; |
308 } | 309 } |
309 | 310 |
310 - (void)dealloc { | 311 - (void)dealloc { |
311 browser_->CloseAllTabs(); | 312 browser_->CloseAllTabs(); |
312 [downloadShelfController_ exiting]; | 313 [downloadShelfController_ exiting]; |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 | 1825 |
1825 - (BOOL)supportsBookmarkBar { | 1826 - (BOOL)supportsBookmarkBar { |
1826 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 1827 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
1827 } | 1828 } |
1828 | 1829 |
1829 - (BOOL)isNormalWindow { | 1830 - (BOOL)isNormalWindow { |
1830 return browser_->type() == Browser::TYPE_NORMAL; | 1831 return browser_->type() == Browser::TYPE_NORMAL; |
1831 } | 1832 } |
1832 | 1833 |
1833 @end // @implementation BrowserWindowController(WindowType) | 1834 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |