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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm

Issue 420413002: Ensure dialogs are centered on browser windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test works Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
index 92c02fcbab7b1e3e14b083ea42331cd5c1e498a5..c408dcfd0c064ae86bede07e33947f3e5c066873 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
@@ -9,6 +9,7 @@
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h"
+#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
namespace {
@@ -243,7 +244,7 @@ NSValue* GetKeyForParentWindow(NSWindow* parent_window) {
}
- (NSRect)overlayWindowFrameForParentView:(NSView*)parentView {
- NSRect viewFrame = [parentView convertRect:[parentView bounds] toView:nil];
+ NSRect viewFrame = GetSheetParentBoundsForParentView(parentView);
id<NSWindowDelegate> delegate = [[parentView window] delegate];
if ([delegate respondsToSelector:@selector(window:

Powered by Google App Engine
This is Rietveld 408576698