| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 name:NSApplicationDidUnhideNotification | 410 name:NSApplicationDidUnhideNotification |
| 411 object:nil]; | 411 object:nil]; |
| 412 | 412 |
| 413 // This must be done after the view is added to the window since it relies | 413 // This must be done after the view is added to the window since it relies |
| 414 // on the window bounds to determine whether to show buttons or not. | 414 // on the window bounds to determine whether to show buttons or not. |
| 415 if ([self hasToolbar]) // Do not create the buttons in popups. | 415 if ([self hasToolbar]) // Do not create the buttons in popups. |
| 416 [toolbarController_ createBrowserActionButtons]; | 416 [toolbarController_ createBrowserActionButtons]; |
| 417 | 417 |
| 418 extension_keybinding_registry_.reset( | 418 extension_keybinding_registry_.reset( |
| 419 new ExtensionKeybindingRegistryCocoa(browser_->profile(), | 419 new ExtensionKeybindingRegistryCocoa(browser_->profile(), |
| 420 [self window])); | 420 [self window], |
| 421 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS)); |
| 421 | 422 |
| 422 // We are done initializing now. | 423 // We are done initializing now. |
| 423 initializing_ = NO; | 424 initializing_ = NO; |
| 424 } | 425 } |
| 425 return self; | 426 return self; |
| 426 } | 427 } |
| 427 | 428 |
| 428 - (void)awakeFromNib { | 429 - (void)awakeFromNib { |
| 429 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. | 430 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. |
| 430 NSSize minSize = [self isTabbedWindow] ? | 431 NSSize minSize = [self isTabbedWindow] ? |
| (...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2201 | 2202 |
| 2202 - (BOOL)supportsBookmarkBar { | 2203 - (BOOL)supportsBookmarkBar { |
| 2203 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2204 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2204 } | 2205 } |
| 2205 | 2206 |
| 2206 - (BOOL)isTabbedWindow { | 2207 - (BOOL)isTabbedWindow { |
| 2207 return browser_->is_type_tabbed(); | 2208 return browser_->is_type_tabbed(); |
| 2208 } | 2209 } |
| 2209 | 2210 |
| 2210 @end // @implementation BrowserWindowController(WindowType) | 2211 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |