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

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

Issue 2275413002: Make the MediaRouterDialogDelegate set initial dialog size in OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use kWindowSizeDeterminedLater Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
index 775ae154665490be79c47801ddf24210e1f13479..fc92d26fac807384d135e881ccac2afc97638e40 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm
@@ -4,6 +4,7 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.h"
+#import "ui/base/cocoa/window_size_constants.h"
#include "ui/gfx/geometry/size.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
@@ -12,6 +13,7 @@
- (id)initWithCustomWindow:(NSWindow*)customWindow
webDialogDelegate:(ui::WebDialogDelegate*)delegate {
if (self = [super initWithCustomWindow:customWindow]) {
+ current_size_ = ui::kWindowSizeDeterminedLater.size;
web_dialog_delegate_ = delegate;
}
@@ -33,6 +35,7 @@
}
- (void)resizeWithNewSize:(NSSize)size {
+ DCHECK(size.height > 0 && size.width > 0);
current_size_ = size;
[customWindow_ setContentSize:current_size_];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698