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

Issue 1779383002: MacViews: Remove constrained window dependencies for certificate viewer. (Closed)

Created:
4 years, 9 months ago by Patti Lor
Modified:
4 years, 3 months ago
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org, Elly Fong-Jones, Robert Sesek
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Remove constrained window dependencies for certificate viewer. Move constrained_window Mac dependencies to a Cocoa build only. To make the MacViews browser's certificate viewer work, refactor out common code taken from the original certificate viewer and subclass into SSLCertificateViewerCocoa and SSLCertificateViewerMacViews. The MacViews certificate viewer will be created via a new constrained_window method ShowWebModalDialogWithOverlayViews(). Similarly, NativeWebContentsModalDialogManagerViews is subclassed into a MacViews specific NativeWebContentsModalDialogManagerViewsMac, which handles hiding/showing the certificate viewer. Note that the certificate viewer is not the same as the Views one because OSX has its own, which is why there is special code for it needed here. BUG=587239 # Long include line in constrained_window_views.cc, wrapped in an ifdef. NOPRESUBMIT=true Committed: https://crrev.com/8f36f7b892825b3117d2b1d2cbd60b05ce6da4ba Cr-Commit-Position: refs/heads/master@{#414971}

Patch Set 1 #

Patch Set 2 : Position correctly (kind of) & block on tab only. #

Total comments: 70

Patch Set 3 : Refactor to use views:: NativeWebContentsModalDialogManagerViews. #

Patch Set 4 : #

Patch Set 5 : Cleanup. #

Patch Set 6 : Fix positioning after resize from top, don't allow interaction with tab WebContents while certifica… #

Total comments: 104

Patch Set 7 : Prevent NativeWeb...Mac from being used for all dialogs, address review comments. #

Patch Set 8 : Fix non-mac builds. #

Patch Set 9 : Rebase & address review comments. #

Total comments: 41

Patch Set 10 : Address review comments. #

Patch Set 11 : Fix gn and other build targets. #

Patch Set 12 : Restore overlayWindow method for SSLCertificateViewerCocoa, fix test, other nits. #

Total comments: 28

Patch Set 13 : Review comments. #

Patch Set 14 : Fix SSLCertificateViewerCocoaTest.* #

Patch Set 15 : Update comment. #

Total comments: 14

Patch Set 16 : Move out ConstrainedWindowSheet to Cocoa-only, other review comments. #

Total comments: 43

Patch Set 17 : Address review comments. #

Patch Set 18 : Keep a reference to the sheet window in single_web_contents_dialog_manager_cocoa.mm. #

Total comments: 2

Patch Set 19 : Rebase. #

Total comments: 14

Patch Set 20 : Rebase & address review comments. #

Total comments: 3

Patch Set 21 : Move web_contents_modal_dialog_manager_views* into components/constrained_window. #

Patch Set 22 : Rebase on top of constrained window refactor CL. #

Patch Set 23 : Revert constrained_window.gypi, remove unused web_contents_modal_dialog_manager_views.cc. #

Patch Set 24 : Rebase on master after dependent CL landed. #

Patch Set 25 : Revert random change that was made accidentally? #

Total comments: 21

Patch Set 26 : Move certificate_viewer_mac.* to chrome/browser/ui and certificate_viewer_mac_views.mm to chrome/br… #

Total comments: 24

Patch Set 27 : rsesek@ review - merge displayForWebContents & initWithCertificate, etc. #

Total comments: 10

Patch Set 28 : msw@ & rsesek@ review, move sheetDidEnd::: into separate SSLCertificateViewerMac declaration. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -278 lines) Patch
A chrome/browser/ui/certificate_viewer_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/browser/ui/certificate_viewer_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +114 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +0 lines, -45 lines 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +0 lines, -208 lines 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +142 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/certificate_viewer_mac_views.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +70 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 11 chunks +21 lines, -17 lines 0 comments Download
M components/constrained_window/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M components/constrained_window/constrained_window_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +10 lines, -0 lines 0 comments Download
M components/constrained_window/constrained_window_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +25 lines, -0 lines 0 comments Download
M components/constrained_window/native_web_contents_modal_dialog_manager_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +13 lines, -1 line 0 comments Download
M components/constrained_window/native_web_contents_modal_dialog_manager_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +15 lines, -5 lines 0 comments Download
A components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +33 lines, -0 lines 0 comments Download
A components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +98 lines, -0 lines 0 comments Download

Messages

Total messages: 95 (58 generated)
Patti Lor
Hi Trent, could you take a look at this initial implementation? It's still a WIP, ...
4 years, 9 months ago (2016-03-20 23:55:08 UTC) #2
tapted
OK - I think the main trick is to call constrained_window::CreateWebModalDialogViews(..) for the overlay window. ...
4 years, 9 months ago (2016-03-21 02:47:13 UTC) #3
Patti Lor
Hi Trent, can you please take another look? If you undo the changes in http://crrev.com/1614663002 ...
4 years, 7 months ago (2016-05-03 00:05:01 UTC) #4
tapted
Nice! this looks like the right approach. Main bits from the comments below: - sizing ...
4 years, 7 months ago (2016-05-04 03:29:26 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1779383002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1779383002/140001
4 years, 7 months ago (2016-05-10 07:19:06 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/2903) ios-simulator-gn on ...
4 years, 7 months ago (2016-05-10 07:21:01 UTC) #9
Patti Lor
Hi Trent, have rebased this off the CL that splits NativeWebContentsModal...Views into a header/body file ...
4 years, 7 months ago (2016-05-11 01:35:19 UTC) #10
tapted
https://codereview.chromium.org/1779383002/diff/160001/chrome/browser/ui/cocoa/certificate_viewer_mac.h File chrome/browser/ui/cocoa/certificate_viewer_mac.h (right): https://codereview.chromium.org/1779383002/diff/160001/chrome/browser/ui/cocoa/certificate_viewer_mac.h#newcode38 chrome/browser/ui/cocoa/certificate_viewer_mac.h:38: @interface SSLCertificateViewerMac : NSObject<ConstrainedWindowSheet> { I wonder.. is there ...
4 years, 7 months ago (2016-05-13 06:08:47 UTC) #11
Patti Lor
PTAL, thanks! The trybot presubmit is failing for a reason unrelated to this CL I ...
4 years, 7 months ago (2016-05-18 04:48:38 UTC) #12
tapted
https://codereview.chromium.org/1779383002/diff/160001/chrome/browser/ui/cocoa/certificate_viewer_mac.h File chrome/browser/ui/cocoa/certificate_viewer_mac.h (right): https://codereview.chromium.org/1779383002/diff/160001/chrome/browser/ui/cocoa/certificate_viewer_mac.h#newcode38 chrome/browser/ui/cocoa/certificate_viewer_mac.h:38: @interface SSLCertificateViewerMac : NSObject<ConstrainedWindowSheet> { On 2016/05/18 04:48:37, Patti ...
4 years, 7 months ago (2016-05-19 01:53:25 UTC) #13
tapted
On 2016/05/18 04:48:38, Patti Lor wrote: > PTAL, thanks! The trybot presubmit is failing for ...
4 years, 7 months ago (2016-05-19 02:46:01 UTC) #14
Patti Lor
Thanks, PTAL. Have CC'd you on the bug for a follow up CL to fix ...
4 years, 6 months ago (2016-05-25 05:43:01 UTC) #15
tapted
I think we can still rename - showSheetForWindow/closeSheetWithAnimation but the secret to do it is ...
4 years, 6 months ago (2016-05-25 06:52:24 UTC) #16
Patti Lor
Thanks Trent, PTAL! Let me know if what I said about the panel_.reset thing makes ...
4 years, 6 months ago (2016-05-31 06:00:33 UTC) #17
tapted
https://codereview.chromium.org/1779383002/diff/300001/chrome/browser/ui/cocoa/certificate_viewer_mac.mm File chrome/browser/ui/cocoa/certificate_viewer_mac.mm (right): https://codereview.chromium.org/1779383002/diff/300001/chrome/browser/ui/cocoa/certificate_viewer_mac.mm#newcode8 chrome/browser/ui/cocoa/certificate_viewer_mac.mm:8: #import "base/mac/scoped_cftyperef.h" nit: include (cf is CoreFoundation, which is ...
4 years, 6 months ago (2016-05-31 07:44:48 UTC) #18
tapted
https://codereview.chromium.org/1779383002/diff/280001/chrome/browser/ui/cocoa/certificate_viewer_mac.mm File chrome/browser/ui/cocoa/certificate_viewer_mac.mm (right): https://codereview.chromium.org/1779383002/diff/280001/chrome/browser/ui/cocoa/certificate_viewer_mac.mm#newcode101 chrome/browser/ui/cocoa/certificate_viewer_mac.mm:101: // build to use |SSLCertificateViewerCocoaBridge::OnConstrainedWindowClosed|, On 2016/05/31 06:00:33, Patti ...
4 years, 6 months ago (2016-06-01 01:12:47 UTC) #19
Patti Lor
Thanks for all the nits! D: See patch set 19 (vs 17) for the change ...
4 years, 6 months ago (2016-06-06 06:52:47 UTC) #22
tapted
This is pretty close! Let's discuss the panel.reset() / releaseSheetWindow thing at your desk https://codereview.chromium.org/1779383002/diff/300001/components/constrained_window/constrained_window_views.cc ...
4 years, 6 months ago (2016-06-07 06:10:03 UTC) #23
Patti Lor
PTAL, thank you! https://codereview.chromium.org/1779383002/diff/400001/chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm File chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm (right): https://codereview.chromium.org/1779383002/diff/400001/chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm#newcode121 chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm:121: WebContentsModalDialogManager::CreateNativeWebModalOverlayManager( On 2016/06/07 06:10:02, tapted wrote: ...
4 years, 6 months ago (2016-06-09 04:07:19 UTC) #24
tapted
lgtm, but +msw for OWNERS and thoughts on the comment below. https://codereview.chromium.org/1779383002/diff/420001/chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm File chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm (right): ...
4 years, 6 months ago (2016-06-09 04:40:00 UTC) #26
msw
https://codereview.chromium.org/1779383002/diff/420001/chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm File chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm (right): https://codereview.chromium.org/1779383002/diff/420001/chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm#newcode98 chrome/browser/ui/cocoa/native_web_contents_modal_dialog_manager_views_mac.mm:98: views::Widget* ShowWebModalDialogWithOverlayViews( On 2016/06/09 04:40:00, tapted wrote: > so, ...
4 years, 6 months ago (2016-06-09 17:36:30 UTC) #27
Patti Lor
Hi msw@, PTAL - this is the Mac certificate viewer CL from ages ago that ...
4 years, 4 months ago (2016-08-19 06:43:26 UTC) #53
msw
I only have minor nits/comments, mostly because I'm not a great cocoa reviewer. I know ...
4 years, 3 months ago (2016-08-22 23:01:19 UTC) #54
Robert Sesek
https://codereview.chromium.org/1779383002/diff/670001/chrome/browser/ui/certificate_viewer_mac.h File chrome/browser/ui/certificate_viewer_mac.h (right): https://codereview.chromium.org/1779383002/diff/670001/chrome/browser/ui/certificate_viewer_mac.h#newcode1 chrome/browser/ui/certificate_viewer_mac.h:1: // Copyright (c) 2013 The Chromium Authors. All rights ...
4 years, 3 months ago (2016-08-24 18:42:41 UTC) #60
Patti Lor
Thanks for the reviews msw@ and rsesek@, PTAL! To rsesek@ specifically: Could I also get ...
4 years, 3 months ago (2016-08-25 08:25:13 UTC) #70
msw
https://codereview.chromium.org/1779383002/diff/650001/components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.mm File components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.mm (right): https://codereview.chromium.org/1779383002/diff/650001/components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.mm#newcode33 components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.mm:33: NSWidth([web_contents->GetTopLevelNativeWindow() frame]); On 2016/08/25 08:25:12, Patti Lor wrote: > ...
4 years, 3 months ago (2016-08-25 15:30:47 UTC) #71
msw
https://codereview.chromium.org/1779383002/diff/710001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (right): https://codereview.chromium.org/1779383002/diff/710001/chrome/chrome_browser_ui.gypi#newcode501 chrome/chrome_browser_ui.gypi:501: 'browser/ui/webui/offline/offline_internals_ui.cc', Make sure you sync and rebase this file ...
4 years, 3 months ago (2016-08-25 15:35:22 UTC) #72
Robert Sesek
https://codereview.chromium.org/1779383002/diff/650001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (right): https://codereview.chromium.org/1779383002/diff/650001/chrome/chrome_browser_ui.gypi#newcode2587 chrome/chrome_browser_ui.gypi:2587: 'browser/ui/cocoa/certificate_viewer_mac_views.mm', On 2016/08/25 08:25:12, Patti Lor wrote: > On ...
4 years, 3 months ago (2016-08-25 21:32:39 UTC) #73
Patti Lor
Hi rsesek@, please take another look, thanks! +ellyjones@ - Could you take a quick look ...
4 years, 3 months ago (2016-08-26 07:38:29 UTC) #79
Robert Sesek
LGTM
4 years, 3 months ago (2016-08-26 16:12:02 UTC) #80
Elly Fong-Jones
https://codereview.chromium.org/1779383002/diff/650001/chrome/chrome_browser_ui.gypi File chrome/chrome_browser_ui.gypi (right): https://codereview.chromium.org/1779383002/diff/650001/chrome/chrome_browser_ui.gypi#newcode2587 chrome/chrome_browser_ui.gypi:2587: 'browser/ui/cocoa/certificate_viewer_mac_views.mm', On 2016/08/25 21:32:38, Robert Sesek wrote: > On ...
4 years, 3 months ago (2016-08-26 16:42:36 UTC) #81
Patti Lor
Thanks all. Will submit with NOPRESUBMIT=true to avoid the error for the > 80 character ...
4 years, 3 months ago (2016-08-29 01:10:22 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1779383002/730001
4 years, 3 months ago (2016-08-29 01:16:30 UTC) #87
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/282986)
4 years, 3 months ago (2016-08-29 02:04:54 UTC) #89
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1779383002/730001
4 years, 3 months ago (2016-08-29 02:49:51 UTC) #91
commit-bot: I haz the power
Committed patchset #28 (id:730001)
4 years, 3 months ago (2016-08-29 03:59:48 UTC) #93
commit-bot: I haz the power
4 years, 3 months ago (2016-08-29 04:02:43 UTC) #95
Message was sent while issue was closed.
Patchset 28 (id:??) landed as
https://crrev.com/8f36f7b892825b3117d2b1d2cbd60b05ce6da4ba
Cr-Commit-Position: refs/heads/master@{#414971}

Powered by Google App Engine
This is Rietveld 408576698