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

Side by Side Diff: chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm

Issue 1674063002: Revert of [Reland] Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h" 5 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
10 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h" 10 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h"
(...skipping 12 matching lines...) Expand all
23 closeCallback:close_callback 23 closeCallback:close_callback
24 isSyncDialog:YES 24 isSyncDialog:YES
25 email:email 25 email:email
26 errorMessage:nil]); 26 errorMessage:nil]);
27 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] 27 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
28 initWithContentRect:[[view_controller_ view] bounds]]); 28 initWithContentRect:[[view_controller_ view] bounds]]);
29 [[window contentView] addSubview:[view_controller_ view]]; 29 [[window contentView] addSubview:[view_controller_ view]];
30 30
31 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 31 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
32 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]); 32 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
33 constrained_window_ = 33 constrained_window_.reset(new ConstrainedWindowMac(
34 CreateAndShowWebModalDialogMac(this, web_contents, sheet); 34 this, web_contents, sheet));
35 } 35 }
36 36
37 OneClickSigninDialogController::~OneClickSigninDialogController() { 37 OneClickSigninDialogController::~OneClickSigninDialogController() {
38 } 38 }
39 39
40 void OneClickSigninDialogController::OnConstrainedWindowClosed( 40 void OneClickSigninDialogController::OnConstrainedWindowClosed(
41 ConstrainedWindowMac* window) { 41 ConstrainedWindowMac* window) {
42 [view_controller_ viewWillClose]; 42 [view_controller_ viewWillClose];
43 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 43 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
44 } 44 }
45 45
46 void OneClickSigninDialogController::PerformClose() { 46 void OneClickSigninDialogController::PerformClose() {
47 constrained_window_->CloseWebContentsModalDialog(); 47 constrained_window_->CloseWebContentsModalDialog();
48 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698