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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2400243002: Remove grow box rect support, browser part. (Closed)
Patch Set: . Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index e26247d4134a5c8285bbd5e836858b38d2d41d4a..3f9f5a88871ab750d2c746cd009394b49cfe2330 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -196,12 +196,6 @@ bool IsTabDetachingInFullscreenEnabled() {
} // namespace
-@interface NSWindow (NSPrivateApis)
-// Note: These functions are private, use -[NSObject respondsToSelector:]
-// before calling them.
-- (NSRect)_growBoxRect;
-@end
-
@implementation BrowserWindowController
+ (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window {
@@ -951,17 +945,10 @@ bool IsTabDetachingInFullscreenEnabled() {
[bookmarkBarController_ isAnimatingBetweenState:BookmarkBar::HIDDEN
andState:BookmarkBar::SHOW];
- BOOL resizeRectDirty = NO;
if ((shouldAdjustBookmarkHeight && view == [bookmarkBarController_ view]) ||
view == [downloadShelfController_ view]) {
CGFloat deltaH = height - NSHeight(frame);
- if ([self adjustWindowHeightBy:deltaH] &&
- view == [downloadShelfController_ view]) {
- // If the window height didn't change, the download shelf will change the
- // size of the contents. If the contents size doesn't change, send it
- // an explicit grow box invalidation (else, the resize message does that.)
- resizeRectDirty = YES;
- }
+ [self adjustWindowHeightBy:deltaH];
}
frame.size.height = height;
@@ -969,15 +956,6 @@ bool IsTabDetachingInFullscreenEnabled() {
[view setFrame:frame];
[self layoutSubviews];
- if (resizeRectDirty) {
- // Send new resize rect to foreground tab.
- if (WebContents* contents = [self webContents]) {
- if (content::RenderViewHost* rvh = contents->GetRenderViewHost()) {
- rvh->GetWidget()->ResizeRectChanged(
- windowShim_->GetRootWindowResizerRect());
- }
- }
- }
}
- (BOOL)handledByExtensionCommand:(NSEvent*)event
@@ -1037,23 +1015,6 @@ bool IsTabDetachingInFullscreenEnabled() {
[toolbarController_ zoomChangedForActiveTab:canShowBubble];
}
-// Return the rect, in WebKit coordinates (flipped), of the window's grow box
-// in the coordinate system of the content area of the currently selected tab.
-// |windowGrowBox| needs to be in the window's coordinate system.
-- (NSRect)selectedTabGrowBoxRect {
- NSWindow* window = [self window];
- if (![window respondsToSelector:@selector(_growBoxRect)])
- return NSZeroRect;
-
- // Before we return a rect, we need to convert it from window coordinates
- // to tab content area coordinates and flip the coordinate system.
- NSRect growBoxRect =
- [[self tabContentArea] convertRect:[window _growBoxRect] fromView:nil];
- growBoxRect.origin.y =
- NSHeight([[self tabContentArea] frame]) - NSMaxY(growBoxRect);
- return growBoxRect;
-}
-
// Accept tabs from a BrowserWindowController with the same Profile.
- (BOOL)canReceiveFrom:(TabWindowController*)source {
BrowserWindowController* realSource =
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698