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