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

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

Issue 1826953002: Fix a regression where the tab-modal signin flow wasn't shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 : SigninViewControllerDelegate(signin_view_controller, web_contents.get()), 74 : SigninViewControllerDelegate(signin_view_controller, web_contents.get()),
75 host_view_([[NSView alloc] initWithFrame:frame]), 75 host_view_([[NSView alloc] initWithFrame:frame]),
76 web_contents_(std::move(web_contents)), 76 web_contents_(std::move(web_contents)),
77 window_( 77 window_(
78 [[ConstrainedWindowCustomWindow alloc] initWithContentRect:frame]) { 78 [[ConstrainedWindowCustomWindow alloc] initWithContentRect:frame]) {
79 window_.get().contentView = host_view_; 79 window_.get().contentView = host_view_;
80 [host_view_ addSubview:web_contents_->GetNativeView()]; 80 [host_view_ addSubview:web_contents_->GetNativeView()];
81 81
82 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 82 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
83 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]); 83 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]);
84 constrained_window_.reset( 84 constrained_window_ =
85 new ConstrainedWindowMac(this, host_web_contents, sheet)); 85 CreateAndShowWebModalDialogMac(this, host_web_contents, sheet);
86 } 86 }
87 87
88 SigninViewControllerDelegateMac::~SigninViewControllerDelegateMac() {} 88 SigninViewControllerDelegateMac::~SigninViewControllerDelegateMac() {}
89 89
90 SigninViewControllerDelegateMac* 90 SigninViewControllerDelegateMac*
91 SigninViewControllerDelegateMac::CreateModalSigninDelegateWithNavigation( 91 SigninViewControllerDelegateMac::CreateModalSigninDelegateWithNavigation(
92 SigninViewController* signin_view_controller, 92 SigninViewController* signin_view_controller,
93 scoped_ptr<content::WebContents> web_contents, 93 scoped_ptr<content::WebContents> web_contents,
94 content::WebContents* host_web_contents, 94 content::WebContents* host_web_contents,
95 NSRect frame) { 95 NSRect frame) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 SigninViewController* signin_view_controller, 226 SigninViewController* signin_view_controller,
227 Browser* browser) { 227 Browser* browser) {
228 return new SigninViewControllerDelegateMac( 228 return new SigninViewControllerDelegateMac(
229 signin_view_controller, 229 signin_view_controller,
230 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents( 230 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
231 browser->profile()), 231 browser->profile()),
232 browser->tab_strip_model()->GetActiveWebContents(), 232 browser->tab_strip_model()->GetActiveWebContents(),
233 NSMakeRect(0, 0, kSyncConfirmationDialogWidth, 233 NSMakeRect(0, 0, kSyncConfirmationDialogWidth,
234 kSyncConfirmationDialogHeight)); 234 kSyncConfirmationDialogHeight));
235 } 235 }
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