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

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

Issue 8566014: Cocoa: Make HTMLDialogWindow resizable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/html_dialog_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
index f4ac3af1507a6e1ed1ff2cae9719037ea7972ce4..d328a03804c63c1d640ffd8d4d589ac5dca6ceca 100644
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
@@ -258,11 +258,8 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent(
gfx::Size dialogSize;
delegate->GetDialogSize(&dialogSize);
NSRect dialogRect = NSMakeRect(0, 0, dialogSize.width(), dialogSize.height());
- // TODO(akalin): Make the window resizable (but with the minimum size being
- // dialog_size and always on top (but not modal) to match the Windows
- // behavior. On the other hand, the fact that HTML dialogs on Windows
- // are resizable could just be an accident. Investigate futher...
- NSUInteger style = NSTitledWindowMask | NSClosableWindowMask;
+ NSUInteger style = NSTitledWindowMask | NSClosableWindowMask |
+ NSResizableWindowMask;
scoped_nsobject<ChromeEventProcessingWindow> window(
[[ChromeEventProcessingWindow alloc]
initWithContentRect:dialogRect
@@ -279,6 +276,7 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent(
[window setWindowController:self];
[window setDelegate:self];
[window setTitle:base::SysUTF16ToNSString(delegate->GetDialogTitle())];
+ [window setMinSize:dialogRect.size];
[window center];
delegate_.reset(new HtmlDialogWindowDelegateBridge(self, profile, delegate));
return self;
« 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