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

Issue 61093002: Make certificate viewer non-modal using BaseShellDialog to fix aura painting (Closed)

Created:
7 years, 1 month ago by scottmg
Modified:
7 years, 1 month ago
Reviewers:
sky, Ryan Sleevi
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Make certificate viewer non-modal using BaseShellDialog to fix aura painting Use BaseShellDialogImpl to spawn the certificate dialog in the background on win aura. Having Windows pump a nested message loop as it does while the dialog is up isn't sufficient because then our tasks that would normally get run by base::MessageLoop don't get executed. These include e.g. GpuProcessHost::RouteOnUIThread which is necessary for other windows to paint. Because the callers don't really care about being modal, but don't have a great place to store the dialog viewer object, use a static method to Show, and have the dialog viewer object own itself as there's no interaction afterwards with the parent anyway. R=sky@chromium.org, rsleevi@chromium.org BUG=306295

Patch Set 1 #

Total comments: 7

Patch Set 2 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -2 lines) Patch
M chrome/browser/ui/views/certificate_viewer_win.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M ui/shell_dialogs/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A ui/shell_dialogs/certificate_viewer_dialog_win.h View 1 1 chunk +72 lines, -0 lines 0 comments Download
A ui/shell_dialogs/certificate_viewer_dialog_win.cc View 1 1 chunk +74 lines, -0 lines 0 comments Download
M ui/shell_dialogs/shell_dialogs.gyp View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
scottmg
sky: code rsleevi: +net DEPS addition
7 years, 1 month ago (2013-11-05 22:02:54 UTC) #1
sky
Why do we need to this change? I get that it caused painting problems, but ...
7 years, 1 month ago (2013-11-05 22:34:02 UTC) #2
scottmg
https://codereview.chromium.org/61093002/diff/1/ui/shell_dialogs/certificate_viewer_dialog_win.h File ui/shell_dialogs/certificate_viewer_dialog_win.h (right): https://codereview.chromium.org/61093002/diff/1/ui/shell_dialogs/certificate_viewer_dialog_win.h#newcode26 ui/shell_dialogs/certificate_viewer_dialog_win.h:26: class SHELL_DIALOGS_EXPORT CertificateViewerDialogWin On 2013/11/05 22:34:03, sky wrote: > ...
7 years, 1 month ago (2013-11-05 23:40:32 UTC) #3
sky
How come the cert viewer blocks painting, but other places that run nested message loops ...
7 years, 1 month ago (2013-11-05 23:51:57 UTC) #4
scottmg
On 2013/11/05 23:51:57, sky wrote: > How come the cert viewer blocks painting, but other ...
7 years, 1 month ago (2013-11-06 00:16:02 UTC) #5
sky
I thought it might be something like that. On Tue, Nov 5, 2013 at 4:16 ...
7 years, 1 month ago (2013-11-06 00:20:20 UTC) #6
scottmg
On 2013/11/06 00:20:20, sky wrote: > I thought it might be something like that. Thanks ...
7 years, 1 month ago (2013-11-06 00:25:27 UTC) #7
Ryan Sleevi
7 years, 1 month ago (2013-11-06 22:47:50 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/61093002/diff/1/ui/shell_dialogs/certificate_...
File ui/shell_dialogs/certificate_viewer_dialog_win.h (right):

https://codereview.chromium.org/61093002/diff/1/ui/shell_dialogs/certificate_...
ui/shell_dialogs/certificate_viewer_dialog_win.h:51: PCCERT_CONTEXT cert_list;
On 2013/11/05 23:40:33, scottmg wrote:
> On 2013/11/05 22:34:03, sky wrote:
> > Does this need to be freed? And is this tied to the life of the cerificate
> > passed in?
> 
> Yes, it does. It's freed in CertificateViewerCompleted which is back on the
main
> thread.
> 
> I don't believe it's tied to the lifetime of the cert that's passed in (my
> understanding is that it copies the data into the new one), but maybe Ryan can
> comment on that.

Correct, it copies into a new one, since the dialog may mutate the object.

Powered by Google App Engine
This is Rietveld 408576698