|
MacViews: Allow the toolkit-views Enterprise Signin Confirmation Dialog to be used
The toolkit-views dialog will be used when --secondary-ui-md is enabled.
(With that flag) The dialog also becomes window-modal on Mac, rather
than tab-modal. This is consistent with other platforms. That's the easy
bit -- ProfileSigninConfirmationDialogViews::ShowDialog() "Just Works".
Adds a browser_test for showing the views dialog - it had no prior
coverage. This uses the TestBrowserDialog framework, which was using
GetAllChildWidgets() to detect a dialog being added. This worked on Mac,
but on Aura the dialog is added as a "transient" child. Update
TestBrowserDialog to use GetAllOwnedWidgets(), which includes transient
children as well as other child windows.
Also, there was a memory leak.
OneClickSigninSyncStarter::OnRegisteredForPolicy() allocated a
SigninDialogDelegate with `new` which was never released. Cocoa tests in
profile_signin_confirmation_view_controller_browsertest.mm didn't pick
this up because the tests use the test harness as the delegate (passing
`this`). The right fix is to pass a std::unique_ptr - do that.
BUG= 681049
Review-Url: https://codereview.chromium.org/2625813003
Cr-Commit-Position: refs/heads/master@{#443751}
Committed: https://chromium.googlesource.com/chromium/src/+/0dd1562593d3cb4ebe882801d76d747641d7b7f0
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+222 lines, -110 lines) |
Patch |
 |
M |
chrome/browser/ui/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_cocoa.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_cocoa.mm
|
View
|
1
2
3
|
3 chunks |
+17 lines, -22 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.h
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+8 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm
|
View
|
1
2
3
|
6 chunks |
+11 lines, -25 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller_browsertest.mm
|
View
|
1
2
3
|
4 chunks |
+47 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/tab_dialogs_cocoa.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm
|
View
|
1
2
3
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/tab_dialogs_views_mac.h
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/tab_dialogs_views_mac.mm
|
View
|
1
2
3
|
2 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/collected_cookies_browsertest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/sync/one_click_signin_sync_starter.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/tab_dialogs.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.h
|
View
|
1
2
3
|
3 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
|
View
|
1
2
3
|
8 chunks |
+15 lines, -9 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views_browsertest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+73 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/tab_dialogs_views.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/tab_dialogs_views.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/test/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 47 (38 generated)
|