| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 339 } |
| 340 | 340 |
| 341 - (TabStripController*)tabStripController { | 341 - (TabStripController*)tabStripController { |
| 342 return tabStripController_.get(); | 342 return tabStripController_.get(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 - (StatusBubbleMac*)statusBubble { | 345 - (StatusBubbleMac*)statusBubble { |
| 346 return statusBubble_; | 346 return statusBubble_; |
| 347 } | 347 } |
| 348 | 348 |
| 349 - (LocationBar*)locationBarBridge { | 349 - (LocationBarViewMac*)locationBarBridge { |
| 350 return [toolbarController_ locationBarBridge]; | 350 return [toolbarController_ locationBarBridge]; |
| 351 } | 351 } |
| 352 | 352 |
| 353 - (void)destroyBrowser { | 353 - (void)destroyBrowser { |
| 354 [NSApp removeWindowsItem:[self window]]; | 354 [NSApp removeWindowsItem:[self window]]; |
| 355 | 355 |
| 356 // We need the window to go away now. | 356 // We need the window to go away now. |
| 357 // We can't actually use |-autorelease| here because there's an embedded | 357 // We can't actually use |-autorelease| here because there's an embedded |
| 358 // run loop in the |-performClose:| which contains its own autorelease pool. | 358 // run loop in the |-performClose:| which contains its own autorelease pool. |
| 359 // Instead call it after a zero-length delay, which gets us back to the main | 359 // Instead call it after a zero-length delay, which gets us back to the main |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 - (BOOL)useVerticalTabs { | 1632 - (BOOL)useVerticalTabs { |
| 1633 return browser_->tabstrip_model()->delegate()->UseVerticalTabs(); | 1633 return browser_->tabstrip_model()->delegate()->UseVerticalTabs(); |
| 1634 } | 1634 } |
| 1635 | 1635 |
| 1636 - (void)setToolbarCollapsedMode:(BOOL)collapsed { | 1636 - (void)setToolbarCollapsedMode:(BOOL)collapsed { |
| 1637 if (toolbarCollapsed_ == collapsed) | 1637 if (toolbarCollapsed_ == collapsed) |
| 1638 return; | 1638 return; |
| 1639 | 1639 |
| 1640 static_cast<LocationBarViewMac*>([self locationBarBridge])-> | 1640 [self locationBarBridge]->SetEditable(!collapsed); |
| 1641 SetEditable(!collapsed); | |
| 1642 | 1641 |
| 1643 // TODO(andybons): Actually hide toolbar if collapsed. | 1642 // TODO(andybons): Actually hide toolbar if collapsed. |
| 1644 | 1643 |
| 1645 toolbarCollapsed_ = collapsed; | 1644 toolbarCollapsed_ = collapsed; |
| 1646 } | 1645 } |
| 1647 | 1646 |
| 1648 - (void)sheetDidEnd:(NSWindow*)sheet | 1647 - (void)sheetDidEnd:(NSWindow*)sheet |
| 1649 returnCode:(NSInteger)code | 1648 returnCode:(NSInteger)code |
| 1650 context:(void*)context { | 1649 context:(void*)context { |
| 1651 [sheet orderOut:self]; | 1650 [sheet orderOut:self]; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 | 1871 |
| 1873 - (BOOL)supportsBookmarkBar { | 1872 - (BOOL)supportsBookmarkBar { |
| 1874 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 1873 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 1875 } | 1874 } |
| 1876 | 1875 |
| 1877 - (BOOL)isNormalWindow { | 1876 - (BOOL)isNormalWindow { |
| 1878 return browser_->type() == Browser::TYPE_NORMAL; | 1877 return browser_->type() == Browser::TYPE_NORMAL; |
| 1879 } | 1878 } |
| 1880 | 1879 |
| 1881 @end // @implementation BrowserWindowController(WindowType) | 1880 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |