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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm

Issue 1815433002: Fix a regression where the tab-modal signin flow wasn't shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h " 5 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h "
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 content::WebContents* host_web_contents, 43 content::WebContents* host_web_contents,
44 NSRect frame) 44 NSRect frame)
45 : SigninViewControllerDelegate(signin_view_controller, web_contents.get()), 45 : SigninViewControllerDelegate(signin_view_controller, web_contents.get()),
46 web_contents_(std::move(web_contents)), 46 web_contents_(std::move(web_contents)),
47 window_( 47 window_(
48 [[ConstrainedWindowCustomWindow alloc] initWithContentRect:frame]) { 48 [[ConstrainedWindowCustomWindow alloc] initWithContentRect:frame]) {
49 window_.get().contentView = web_contents_->GetNativeView(); 49 window_.get().contentView = web_contents_->GetNativeView();
50 50
51 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 51 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
52 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]); 52 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]);
53 constrained_window_.reset( 53 constrained_window_ =
54 new ConstrainedWindowMac(this, host_web_contents, sheet)); 54 CreateAndShowWebModalDialogMac(this, host_web_contents, sheet);
55 } 55 }
56 56
57 SigninViewControllerDelegateMac::~SigninViewControllerDelegateMac() {} 57 SigninViewControllerDelegateMac::~SigninViewControllerDelegateMac() {}
58 58
59 void SigninViewControllerDelegateMac::OnConstrainedWindowClosed( 59 void SigninViewControllerDelegateMac::OnConstrainedWindowClosed(
60 ConstrainedWindowMac* window) { 60 ConstrainedWindowMac* window) {
61 ResetSigninViewControllerDelegate(); 61 ResetSigninViewControllerDelegate();
62 delete this; 62 delete this;
63 } 63 }
64 64
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 SigninViewController* signin_view_controller, 137 SigninViewController* signin_view_controller,
138 Browser* browser) { 138 Browser* browser) {
139 return new SigninViewControllerDelegateMac( 139 return new SigninViewControllerDelegateMac(
140 signin_view_controller, 140 signin_view_controller,
141 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents( 141 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
142 browser->profile()), 142 browser->profile()),
143 browser->tab_strip_model()->GetActiveWebContents(), 143 browser->tab_strip_model()->GetActiveWebContents(),
144 NSMakeRect(0, 0, kSyncConfirmationDialogWidth, 144 NSMakeRect(0, 0, kSyncConfirmationDialogWidth,
145 kSyncConfirmationDialogHeight)); 145 kSyncConfirmationDialogHeight));
146 } 146 }
OLDNEW
« 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