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

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

Issue 7461134: [Mac] Unspoofable infobars v3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Rohit 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
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/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 <cmath> 9 #include <cmath>
10 #include <numeric> 10 #include <numeric>
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 NSUInteger modifierFlags = [[NSApp currentEvent] modifierFlags]; 2227 NSUInteger modifierFlags = [[NSApp currentEvent] modifierFlags];
2228 BOOL slomo = (modifierFlags & NSShiftKeyMask) != 0; 2228 BOOL slomo = (modifierFlags & NSShiftKeyMask) != 0;
2229 2229
2230 // Cover info bars, inspector window, and detached bookmark bar on NTP. 2230 // Cover info bars, inspector window, and detached bookmark bar on NTP.
2231 // Do not cover download shelf. 2231 // Do not cover download shelf.
2232 NSRect activeArea = [[self tabContentArea] frame]; 2232 NSRect activeArea = [[self tabContentArea] frame];
2233 // Take out the anti-spoof height so that Tabpose doesn't draw on top of the 2233 // Take out the anti-spoof height so that Tabpose doesn't draw on top of the
2234 // browser chrome. 2234 // browser chrome.
2235 activeArea.size.height += 2235 activeArea.size.height +=
2236 NSHeight([[infoBarContainerController_ view] frame]) - 2236 NSHeight([[infoBarContainerController_ view] frame]) -
2237 [infoBarContainerController_ antiSpoofHeight]; 2237 [infoBarContainerController_ overlappingTipHeight];
2238 if ([self isBookmarkBarVisible] && [self placeBookmarkBarBelowInfoBar]) { 2238 if ([self isBookmarkBarVisible] && [self placeBookmarkBarBelowInfoBar]) {
2239 NSView* bookmarkBarView = [bookmarkBarController_ view]; 2239 NSView* bookmarkBarView = [bookmarkBarController_ view];
2240 activeArea.size.height += NSHeight([bookmarkBarView frame]); 2240 activeArea.size.height += NSHeight([bookmarkBarView frame]);
2241 } 2241 }
2242 2242
2243 // Hide the infobar container so that the anti-spoof bulge doesn't show when 2243 // Hide the infobar container so that the anti-spoof bulge doesn't show when
2244 // Tabpose is open. 2244 // Tabpose is open.
2245 [[infoBarContainerController_ view] setHidden:YES]; 2245 [[infoBarContainerController_ view] setHidden:YES];
2246 2246
2247 TabposeWindow* window = 2247 TabposeWindow* window =
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 2283
2284 - (BOOL)supportsBookmarkBar { 2284 - (BOOL)supportsBookmarkBar {
2285 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2285 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2286 } 2286 }
2287 2287
2288 - (BOOL)isTabbedWindow { 2288 - (BOOL)isTabbedWindow {
2289 return browser_->is_type_tabbed(); 2289 return browser_->is_type_tabbed();
2290 } 2290 }
2291 2291
2292 @end // @implementation BrowserWindowController(WindowType) 2292 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698