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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

Issue 1446623003: [Reland] Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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/profiles/user_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 48a02249c65b03c656aa468c7e2a0f2419ba30f9..cdae2820c1fff4728579324166488a4274537dbe 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -167,7 +167,7 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver,
std::string emailAddress_;
content::WebContents* webContents_;
scoped_ptr<ReauthDialogDelegate> webContentsDelegate_;
- scoped_ptr<ConstrainedWindowMac> constrained_window_;
+ std::unique_ptr<ConstrainedWindowMac> constrained_window_;
scoped_ptr<content::WebContents> reauthWebContents_;
}
- (id)initWithProfile:(Profile*)profile
@@ -203,9 +203,9 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver,
base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[self window]]);
- constrained_window_.reset(
- new ConstrainedWindowMac(
- webContentsDelegate_.get(), webContents_, sheet));
+ constrained_window_ =
+ CreateAndShowWebModalDialogMac(
+ webContentsDelegate_.get(), webContents_, sheet);
// The close button needs to call CloseWebContentsModalDialog() on the
// constrained window isntead of just [window close] so grab a reference to

Powered by Google App Engine
This is Rietveld 408576698