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