Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/ui/cocoa/tabpose_window.mm

Issue 7461134: [Mac] Unspoofable infobars v3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698