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

Issue 866263008: MacViews: Unify web contents modal dialog types (Closed)

Created:
5 years, 11 months ago by Andre
Modified:
5 years, 9 months ago
CC:
chromium-reviews, tfarina, Greg Billock, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Unify web contents modal dialog types The #if around NativeWebContentsModalDialog is a problem for building the MacViews browser. Unify them to be gfx::NativeWindow on all platforms. Refactor the cocoa side to move code from ConstrainedWindowMac into SingleWebContentsDialogManagerCocoa, while keeping ConstrainedWindowMac's interface the same as before. The Views side only needs simple changes from NativeView to NativeWindow. BUG=425229 Committed: https://crrev.com/5f1263bb318f072343f59dec4b310a522c80b9a2 Cr-Commit-Position: refs/heads/master@{#318813}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : Fix test crashes #

Total comments: 1

Patch Set 5 : Another idea #

Total comments: 7

Patch Set 6 : Refining and fixed tests #

Total comments: 17

Patch Set 7 : Fixes for tapted #

Total comments: 8

Patch Set 8 : Merged ConstrainedWindowMac and ModalDialogClient #

Patch Set 9 : Fix for wittman #

Total comments: 9

Patch Set 10 : Fix for rsesek #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -174 lines) Patch
M chrome/browser/ui/cocoa/certificate_viewer_mac.mm View 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm View 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h View 1 2 3 4 5 6 7 2 chunks +16 lines, -22 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 4 5 6 7 1 chunk +16 lines, -59 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm View 1 2 5 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.h View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm View 1 2 3 4 5 6 7 8 1 chunk +87 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm View 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_cocoa.mm View 1 2 3 4 5 6 1 chunk +0 lines, -71 lines 0 comments Download
M chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M components/web_modal/native_web_contents_modal_dialog.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -15 lines 0 comments Download

Messages

Total messages: 34 (7 generated)
Andre
Hey Mike, looking for your advice on this. We are porting Views to Mac. I'm ...
5 years, 11 months ago (2015-01-27 00:28:16 UTC) #2
Mike Wittman
On 2015/01/27 00:28:16, Andre wrote: > Hey Mike, looking for your advice on this. > ...
5 years, 11 months ago (2015-01-27 23:09:58 UTC) #3
Andre
Thanks Mike! Trent, do you have a better idea? Basically I want to add web_contents_modal_dialog_manager_views.cc ...
5 years, 10 months ago (2015-02-17 22:22:31 UTC) #5
tapted
On 2015/02/17 22:22:31, Andre wrote: > Thanks Mike! > Trent, do you have a better ...
5 years, 10 months ago (2015-02-19 11:35:40 UTC) #6
tapted
On 2015/02/19 11:35:40, tapted wrote: > On 2015/02/17 22:22:31, Andre wrote: > > Thanks Mike! ...
5 years, 10 months ago (2015-02-23 22:33:36 UTC) #7
Andre
Thanks Trent! PTAL at https://crbug.com/157161 for the original motivation. Patchset #5 (rough) is another idea ...
5 years, 10 months ago (2015-02-24 21:31:31 UTC) #8
tapted
some initial comments. not sure how accurate the comments are - lifetime of windows on ...
5 years, 10 months ago (2015-02-25 06:23:28 UTC) #9
Mike Wittman
This looks like a fruitful approach to me. At a minimum, moving the Mac code ...
5 years, 10 months ago (2015-02-25 20:40:53 UTC) #10
Andre
Turns out many tests expect ConstrainedWindowMac to use WCMDM so they failed. Mike, Trent, PTAL ...
5 years, 10 months ago (2015-02-26 05:55:57 UTC) #11
Mike Wittman
On 2015/02/26 05:55:57, Andre wrote: > Turns out many tests expect ConstrainedWindowMac to use WCMDM ...
5 years, 10 months ago (2015-02-26 19:57:38 UTC) #12
tapted
https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h (right): https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode50 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:50: base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; is this still needed? https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm ...
5 years, 10 months ago (2015-02-26 23:34:49 UTC) #13
Andre
https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h (right): https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode50 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:50: base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; On 2015/02/26 23:34:48, tapted wrote: > is ...
5 years, 9 months ago (2015-03-02 02:55:56 UTC) #15
tapted
lgtm % nits Maybe say a bit more in the CL description about the approach ...
5 years, 9 months ago (2015-03-02 04:28:50 UTC) #16
Mike Wittman
lgtm Please be sure to test the close behavior when the browser window is closed ...
5 years, 9 months ago (2015-03-02 18:35:53 UTC) #17
Andre
https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm (right): https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm#newcode36 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm:36: make_scoped_ptr(native_manager_)); On 2015/03/02 04:28:50, tapted wrote: > On 2015/03/02 ...
5 years, 9 months ago (2015-03-02 18:47:31 UTC) #18
Andre
On 2015/03/02 18:35:53, Mike Wittman wrote: > lgtm > > Please be sure to test ...
5 years, 9 months ago (2015-03-02 18:48:27 UTC) #19
Andre
+rsesek for Cocoa. +msw for c/b/ui/views. Thanks! https://codereview.chromium.org/866263008/diff/140001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm File chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm (right): https://codereview.chromium.org/866263008/diff/140001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm#newcode1 chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm:1: // Copyright ...
5 years, 9 months ago (2015-03-02 18:50:24 UTC) #21
msw
c/b/ui/views lgtm
5 years, 9 months ago (2015-03-02 19:26:10 UTC) #23
Robert Sesek
https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm (right): https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm#newcode30 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm:30: auto manager = WebContentsModalDialogManager::FromWebContents(web_contents); Can |manager| be null? https://codereview.chromium.org/866263008/diff/180001/components/web_modal/native_web_contents_modal_dialog.h ...
5 years, 9 months ago (2015-03-02 22:15:27 UTC) #24
tapted
https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm (right): https://codereview.chromium.org/866263008/diff/100001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm#newcode36 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm:36: make_scoped_ptr(native_manager_)); On 2015/03/02 18:47:31, Andre wrote: > On 2015/03/02 ...
5 years, 9 months ago (2015-03-02 22:25:46 UTC) #25
Andre
https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm (right): https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm#newcode30 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm:30: auto manager = WebContentsModalDialogManager::FromWebContents(web_contents); On 2015/03/02 22:15:27, Robert Sesek ...
5 years, 9 months ago (2015-03-02 22:45:38 UTC) #26
Mike Wittman
https://codereview.chromium.org/866263008/diff/180001/components/web_modal/native_web_contents_modal_dialog.h File components/web_modal/native_web_contents_modal_dialog.h (right): https://codereview.chromium.org/866263008/diff/180001/components/web_modal/native_web_contents_modal_dialog.h#newcode12 components/web_modal/native_web_contents_modal_dialog.h:12: // TODO(gbillock): rename this file On 2015/03/02 22:45:38, Andre ...
5 years, 9 months ago (2015-03-02 22:48:31 UTC) #27
Robert Sesek
LGTM https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm (right): https://codereview.chromium.org/866263008/diff/180001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm#newcode30 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm:30: auto manager = WebContentsModalDialogManager::FromWebContents(web_contents); On 2015/03/02 22:45:38, Andre ...
5 years, 9 months ago (2015-03-02 22:50:22 UTC) #28
msw
https://codereview.chromium.org/866263008/diff/180001/components/web_modal/native_web_contents_modal_dialog.h File components/web_modal/native_web_contents_modal_dialog.h (right): https://codereview.chromium.org/866263008/diff/180001/components/web_modal/native_web_contents_modal_dialog.h#newcode12 components/web_modal/native_web_contents_modal_dialog.h:12: // TODO(gbillock): rename this file On 2015/03/02 22:48:31, Mike ...
5 years, 9 months ago (2015-03-02 23:07:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/866263008/200001
5 years, 9 months ago (2015-03-03 01:05:22 UTC) #32
commit-bot: I haz the power
Committed patchset #10 (id:200001)
5 years, 9 months ago (2015-03-03 01:37:23 UTC) #33
commit-bot: I haz the power
5 years, 9 months ago (2015-03-03 01:38:29 UTC) #34
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/5f1263bb318f072343f59dec4b310a522c80b9a2
Cr-Commit-Position: refs/heads/master@{#318813}

Powered by Google App Engine
This is Rietveld 408576698