| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 | 1550 |
| 1551 - (BOOL)isDownloadShelfVisible { | 1551 - (BOOL)isDownloadShelfVisible { |
| 1552 return downloadShelfController_ != nil && | 1552 return downloadShelfController_ != nil && |
| 1553 [downloadShelfController_ isVisible]; | 1553 [downloadShelfController_ isVisible]; |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 - (DownloadShelfController*)downloadShelf { | 1556 - (DownloadShelfController*)downloadShelf { |
| 1557 if (!downloadShelfController_.get()) { | 1557 if (!downloadShelfController_.get()) { |
| 1558 downloadShelfController_.reset([[DownloadShelfController alloc] | 1558 downloadShelfController_.reset([[DownloadShelfController alloc] |
| 1559 initWithBrowser:browser_.get() resizeDelegate:self]); | 1559 initWithBrowser:browser_.get() resizeDelegate:self]); |
| 1560 [self.chromeContentView addSubview:[downloadShelfController_ view]]; | 1560 [[[self window] contentView] addSubview:[downloadShelfController_ view]]; |
| 1561 } | 1561 } |
| 1562 return downloadShelfController_; | 1562 return downloadShelfController_; |
| 1563 } | 1563 } |
| 1564 | 1564 |
| 1565 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController { | 1565 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController { |
| 1566 // Shouldn't call addFindBar twice. | 1566 // Shouldn't call addFindBar twice. |
| 1567 DCHECK(!findBarCocoaController_.get()); | 1567 DCHECK(!findBarCocoaController_.get()); |
| 1568 | 1568 |
| 1569 // Create a controller for the findbar. | 1569 // Create a controller for the findbar. |
| 1570 findBarCocoaController_.reset([findBarCocoaController retain]); | 1570 findBarCocoaController_.reset([findBarCocoaController retain]); |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 | 2296 |
| 2297 - (BOOL)supportsBookmarkBar { | 2297 - (BOOL)supportsBookmarkBar { |
| 2298 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2298 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2299 } | 2299 } |
| 2300 | 2300 |
| 2301 - (BOOL)isTabbedWindow { | 2301 - (BOOL)isTabbedWindow { |
| 2302 return browser_->is_type_tabbed(); | 2302 return browser_->is_type_tabbed(); |
| 2303 } | 2303 } |
| 2304 | 2304 |
| 2305 @end // @implementation BrowserWindowController(WindowType) | 2305 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |