| 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 <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
| 8 | 8 |
| 9 #include "app/mac/scoped_nsdisable_screen_updates.h" | 9 #include "app/mac/scoped_nsdisable_screen_updates.h" |
| 10 #include "app/mac/nsimage_cache.h" | 10 #include "app/mac/nsimage_cache.h" |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 | 1336 |
| 1337 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController { | 1337 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController { |
| 1338 // Shouldn't call addFindBar twice. | 1338 // Shouldn't call addFindBar twice. |
| 1339 DCHECK(!findBarCocoaController_.get()); | 1339 DCHECK(!findBarCocoaController_.get()); |
| 1340 | 1340 |
| 1341 // Create a controller for the findbar. | 1341 // Create a controller for the findbar. |
| 1342 findBarCocoaController_.reset([findBarCocoaController retain]); | 1342 findBarCocoaController_.reset([findBarCocoaController retain]); |
| 1343 NSView *contentView = [[self window] contentView]; | 1343 NSView *contentView = [[self window] contentView]; |
| 1344 [contentView addSubview:[findBarCocoaController_ view] | 1344 [contentView addSubview:[findBarCocoaController_ view] |
| 1345 positioned:NSWindowAbove | 1345 positioned:NSWindowAbove |
| 1346 relativeTo:[toolbarController_ view]]; | 1346 relativeTo:[infoBarContainerController_ view]]; |
| 1347 | 1347 |
| 1348 // Place the find bar immediately below the toolbar/attached bookmark bar. In | 1348 // Place the find bar immediately below the toolbar/attached bookmark bar. In |
| 1349 // fullscreen mode, it hangs off the top of the screen when the bar is hidden. | 1349 // fullscreen mode, it hangs off the top of the screen when the bar is hidden. |
| 1350 CGFloat maxY = [self placeBookmarkBarBelowInfoBar] ? | 1350 CGFloat maxY = [self placeBookmarkBarBelowInfoBar] ? |
| 1351 NSMinY([[toolbarController_ view] frame]) : | 1351 NSMinY([[toolbarController_ view] frame]) : |
| 1352 NSMinY([[bookmarkBarController_ view] frame]); | 1352 NSMinY([[bookmarkBarController_ view] frame]); |
| 1353 CGFloat maxWidth = NSWidth([contentView frame]); | 1353 CGFloat maxWidth = NSWidth([contentView frame]); |
| 1354 [findBarCocoaController_ positionFindBarViewAtMaxY:maxY maxWidth:maxWidth]; | 1354 [findBarCocoaController_ positionFindBarViewAtMaxY:maxY maxWidth:maxWidth]; |
| 1355 } | 1355 } |
| 1356 | 1356 |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 | 2108 |
| 2109 - (BOOL)supportsBookmarkBar { | 2109 - (BOOL)supportsBookmarkBar { |
| 2110 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2110 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 - (BOOL)isNormalWindow { | 2113 - (BOOL)isNormalWindow { |
| 2114 return browser_->type() == Browser::TYPE_NORMAL; | 2114 return browser_->type() == Browser::TYPE_NORMAL; |
| 2115 } | 2115 } |
| 2116 | 2116 |
| 2117 @end // @implementation BrowserWindowController(WindowType) | 2117 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |