| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 | 465 |
| 466 - (LocationBarViewMac*)locationBarBridge { | 466 - (LocationBarViewMac*)locationBarBridge { |
| 467 return [toolbarController_ locationBarBridge]; | 467 return [toolbarController_ locationBarBridge]; |
| 468 } | 468 } |
| 469 | 469 |
| 470 - (Profile*)profile { | 470 - (Profile*)profile { |
| 471 return browser_->profile(); | 471 return browser_->profile(); |
| 472 } | 472 } |
| 473 | 473 |
| 474 - (AvatarButtonController*)avatarButtonController { |
| 475 return avatarButtonController_.get(); |
| 476 } |
| 477 |
| 474 - (void)destroyBrowser { | 478 - (void)destroyBrowser { |
| 475 [NSApp removeWindowsItem:[self window]]; | 479 [NSApp removeWindowsItem:[self window]]; |
| 476 | 480 |
| 477 // We need the window to go away now. | 481 // We need the window to go away now. |
| 478 // We can't actually use |-autorelease| here because there's an embedded | 482 // We can't actually use |-autorelease| here because there's an embedded |
| 479 // run loop in the |-performClose:| which contains its own autorelease pool. | 483 // run loop in the |-performClose:| which contains its own autorelease pool. |
| 480 // Instead call it after a zero-length delay, which gets us back to the main | 484 // Instead call it after a zero-length delay, which gets us back to the main |
| 481 // event loop. | 485 // event loop. |
| 482 [self performSelector:@selector(autorelease) | 486 [self performSelector:@selector(autorelease) |
| 483 withObject:nil | 487 withObject:nil |
| (...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2171 | 2175 |
| 2172 - (BOOL)supportsBookmarkBar { | 2176 - (BOOL)supportsBookmarkBar { |
| 2173 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2177 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2174 } | 2178 } |
| 2175 | 2179 |
| 2176 - (BOOL)isTabbedWindow { | 2180 - (BOOL)isTabbedWindow { |
| 2177 return browser_->is_type_tabbed(); | 2181 return browser_->is_type_tabbed(); |
| 2178 } | 2182 } |
| 2179 | 2183 |
| 2180 @end // @implementation BrowserWindowController(WindowType) | 2184 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |