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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 name:NSApplicationDidUnhideNotification | 409 name:NSApplicationDidUnhideNotification |
410 object:nil]; | 410 object:nil]; |
411 | 411 |
412 // This must be done after the view is added to the window since it relies | 412 // This must be done after the view is added to the window since it relies |
413 // on the window bounds to determine whether to show buttons or not. | 413 // on the window bounds to determine whether to show buttons or not. |
414 if ([self hasToolbar]) // Do not create the buttons in popups. | 414 if ([self hasToolbar]) // Do not create the buttons in popups. |
415 [toolbarController_ createBrowserActionButtons]; | 415 [toolbarController_ createBrowserActionButtons]; |
416 | 416 |
417 extension_keybinding_registry_.reset( | 417 extension_keybinding_registry_.reset( |
418 new ExtensionKeybindingRegistryCocoa(browser_->profile(), | 418 new ExtensionKeybindingRegistryCocoa(browser_->profile(), |
419 [self window])); | 419 [self window], |
| 420 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS)); |
420 | 421 |
421 // We are done initializing now. | 422 // We are done initializing now. |
422 initializing_ = NO; | 423 initializing_ = NO; |
423 } | 424 } |
424 return self; | 425 return self; |
425 } | 426 } |
426 | 427 |
427 - (void)awakeFromNib { | 428 - (void)awakeFromNib { |
428 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. | 429 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. |
429 NSSize minSize = [self isTabbedWindow] ? | 430 NSSize minSize = [self isTabbedWindow] ? |
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 | 2218 |
2218 - (BOOL)supportsBookmarkBar { | 2219 - (BOOL)supportsBookmarkBar { |
2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2220 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2220 } | 2221 } |
2221 | 2222 |
2222 - (BOOL)isTabbedWindow { | 2223 - (BOOL)isTabbedWindow { |
2223 return browser_->is_type_tabbed(); | 2224 return browser_->is_type_tabbed(); |
2224 } | 2225 } |
2225 | 2226 |
2226 @end // @implementation BrowserWindowController(WindowType) | 2227 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |