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

Issue 1234073002: Allow cert-popup for WebView guests. (Closed)

Created:
5 years, 5 months ago by wjmaclean
Modified:
5 years, 5 months ago
CC:
chromium-reviews, Roger Tawa OOO till Jul 10th, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow cert-popup for WebView guests. The SSL cert-selection dialog is currently being suppressed for requests originating within a WebView guest. This appears to be on account of 1) ShowSSLClientCertificateSelector() not checking to see if the current WebContents is actually a guest without a WebContentsModalDialogManager, in which case it should attempt to use the embedder's WebContentsModalDialogManager, and possibly also 2) The embedder WebContents in the inline login view will not have a WebContentsModalDialogManager since it is created via a views::WebView. This CL partially remedies this by applying the correct check for the existence of an embedder WebContentsModalDialogManager in the SSL client certificate dialog code. It does not, however, provide a WebContentsModalDialogManager for the embedder WebContents in ProfileChooserView; this will be done in a separate CL (as it will require some UI design work as well) Note: applications that want the ability to show the certificate selector dialog,but are not hosted in a browser tab, have the option to provide a WebContentsModalDialogManager for the embedder's WebContents. BUG=499996 Committed: https://crrev.com/c5e4af9d662bc608ef86d03158ae1c7429bf7436 Cr-Commit-Position: refs/heads/master@{#338957}

Patch Set 1 : #

Patch Set 2 : Fix Mac compile. #

Patch Set 3 : Add comment. #

Total comments: 4

Patch Set 4 : Inline check for dialog manager. #

Patch Set 5 : Add comment clarifying return value for GetTopLevelWebContents(). #

Patch Set 6 : Add comment: return value from GetTopLevelWebContents() is always non-null. #

Patch Set 7 : Inline Mac check for top-level web-contents. #

Total comments: 7

Patch Set 8 : Improve comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
M chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/views/certificate_selector.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/certificate_selector.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ssl_client_certificate_selector.cc View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 28 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234073002/60001
5 years, 5 months ago (2015-07-14 17:50:55 UTC) #3
wjmaclean
Here's the non-ProfileChooserView part that we talked about ... ptal.
5 years, 5 months ago (2015-07-14 18:00:53 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-14 19:19:18 UTC) #7
wjmaclean
jochen@chromium.org: Please take a look ... this is all plumbing to expose a condition check ...
5 years, 5 months ago (2015-07-14 19:22:50 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1234073002/diff/60001/chrome/browser/ui/views/certificate_selector.cc File chrome/browser/ui/views/certificate_selector.cc (right): https://codereview.chromium.org/1234073002/diff/60001/chrome/browser/ui/views/certificate_selector.cc#newcode92 chrome/browser/ui/views/certificate_selector.cc:92: return constrained_window::HasTopLevelDialogManager(web_contents); not sure I understand why you can't ...
5 years, 5 months ago (2015-07-15 13:34:01 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234073002/80001
5 years, 5 months ago (2015-07-15 13:59:55 UTC) #12
wjmaclean
Comments addressed, ptal? https://codereview.chromium.org/1234073002/diff/60001/chrome/browser/ui/views/certificate_selector.cc File chrome/browser/ui/views/certificate_selector.cc (right): https://codereview.chromium.org/1234073002/diff/60001/chrome/browser/ui/views/certificate_selector.cc#newcode92 chrome/browser/ui/views/certificate_selector.cc:92: return constrained_window::HasTopLevelDialogManager(web_contents); On 2015/07/15 13:34:01, jochen ...
5 years, 5 months ago (2015-07-15 13:59:58 UTC) #13
jochen (gone - plz use gerrit)
lgtm
5 years, 5 months ago (2015-07-15 14:01:14 UTC) #14
wjmaclean
> > Yes, the return value is guaranteed to be non-null. If the WebContents* passed ...
5 years, 5 months ago (2015-07-15 14:01:39 UTC) #15
wjmaclean
Just to update the status, the effort to inline in CertificateSelector breaks Mac, since it's ...
5 years, 5 months ago (2015-07-15 14:40:38 UTC) #16
wjmaclean
I've uploaded a speculative inlining of the Mac check for top level web contents, let ...
5 years, 5 months ago (2015-07-15 14:48:12 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234073002/130001
5 years, 5 months ago (2015-07-15 15:26:10 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-15 17:01:40 UTC) #21
davidben
lgtm with nits on comments. https://codereview.chromium.org/1234073002/diff/130001/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm File chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm (right): https://codereview.chromium.org/1234073002/diff/130001/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm#newcode84 chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm:84: // Use GetTopLevelWebContents() below ...
5 years, 5 months ago (2015-07-15 21:30:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1234073002/150001
5 years, 5 months ago (2015-07-15 22:57:58 UTC) #25
wjmaclean
https://codereview.chromium.org/1234073002/diff/130001/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm File chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm (right): https://codereview.chromium.org/1234073002/diff/130001/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm#newcode84 chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm:84: // Use GetTopLevelWebContents() below to find top-level embedder if ...
5 years, 5 months ago (2015-07-15 23:06:24 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:150001)
5 years, 5 months ago (2015-07-16 00:11:31 UTC) #27
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 00:13:22 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c5e4af9d662bc608ef86d03158ae1c7429bf7436
Cr-Commit-Position: refs/heads/master@{#338957}

Powered by Google App Engine
This is Rietveld 408576698