| 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/tabpose_window.h" | 5 #import "chrome/browser/ui/cocoa/tabpose_window.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 NSWindow* window = [contents_->tab_contents()->GetNativeView() window]; | 225 NSWindow* window = [contents_->tab_contents()->GetNativeView() window]; |
| 226 NSWindowController* windowController = [window windowController]; | 226 NSWindowController* windowController = [window windowController]; |
| 227 if ([windowController isKindOfClass:[BrowserWindowController class]]) { | 227 if ([windowController isKindOfClass:[BrowserWindowController class]]) { |
| 228 BrowserWindowController* bwc = | 228 BrowserWindowController* bwc = |
| 229 static_cast<BrowserWindowController*>(windowController); | 229 static_cast<BrowserWindowController*>(windowController); |
| 230 InfoBarContainerController* infoBarContainer = | 230 InfoBarContainerController* infoBarContainer = |
| 231 [bwc infoBarContainerController]; | 231 [bwc infoBarContainerController]; |
| 232 // TODO(thakis|rsesek): This is not correct for background tabs with | 232 // TODO(thakis|rsesek): This is not correct for background tabs with |
| 233 // infobars as the aspect ratio will be wrong. Fix that. | 233 // infobars as the aspect ratio will be wrong. Fix that. |
| 234 topOffset += NSHeight([[infoBarContainer view] frame]) - | 234 topOffset += NSHeight([[infoBarContainer view] frame]) - |
| 235 [infoBarContainer antiSpoofHeight]; | 235 [infoBarContainer overlappingTipHeight]; |
| 236 } | 236 } |
| 237 | 237 |
| 238 bool always_show_bookmark_bar = | 238 bool always_show_bookmark_bar = |
| 239 contents_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); | 239 contents_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); |
| 240 bool has_detached_bookmark_bar = | 240 bool has_detached_bookmark_bar = |
| 241 contents_->bookmark_tab_helper()->ShouldShowBookmarkBar() && | 241 contents_->bookmark_tab_helper()->ShouldShowBookmarkBar() && |
| 242 !always_show_bookmark_bar; | 242 !always_show_bookmark_bar; |
| 243 if (has_detached_bookmark_bar) | 243 if (has_detached_bookmark_bar) |
| 244 topOffset += bookmarks::kNTPBookmarkBarHeight; | 244 topOffset += bookmarks::kNTPBookmarkBarHeight; |
| 245 | 245 |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 tile.set_tab_contents(contents); | 1673 tile.set_tab_contents(contents); |
| 1674 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; | 1674 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; |
| 1675 [thumbLayer setTabContents:contents]; | 1675 [thumbLayer setTabContents:contents]; |
| 1676 } | 1676 } |
| 1677 | 1677 |
| 1678 - (void)tabStripModelDeleted { | 1678 - (void)tabStripModelDeleted { |
| 1679 [self close]; | 1679 [self close]; |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 @end | 1682 @end |
| OLD | NEW |