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

Issue 2357243003: [UI] Make auto-resizable constrained web dialog work even when initiated (Closed)

Created:
4 years, 3 months ago by imcheng
Modified:
4 years, 2 months ago
Reviewers:
msw, wjmaclean
CC:
chromium-reviews, tfarina, lazyboy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[UI] Make auto-resizable constrained web dialog work even when initiated from a non-top-level WebContents (<webview>). CreateWebModalDialogViews and ShowModalDialog should only be called with a top-level WebContents since they assume the existence of WebContentsModalDialogManager. For non-autoresizable dialogs, this is already taken care of by ShowWebModalDialogViews(). For resizable dialogs, these 2 functions have to be called separately. Introduce a helper function GetTopLevelWebContents that can be used by the autoresize logic as well as ShowWebModalDialogViews(). BUG=649191 Committed: https://crrev.com/c5eae4a12a589376be4c5d06fe4c356ee6d495a5 Cr-Commit-Position: refs/heads/master@{#420636}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -10 lines) Patch
M chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc View 1 3 chunks +25 lines, -8 lines 0 comments Download
M components/constrained_window/constrained_window_views.h View 1 chunk +4 lines, -0 lines 0 comments Download
M components/constrained_window/constrained_window_views.cc View 3 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
imcheng
msw / wjmaclean: PTAL at everything Let me know if you prefer another way to ...
4 years, 3 months ago (2016-09-22 00:46:30 UTC) #2
msw
https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc File chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc#newcode83 chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc:83: content::WebContents* top_level_web_contents = It seems odd to present a ...
4 years, 3 months ago (2016-09-22 03:27:35 UTC) #3
imcheng
https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc File chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc#newcode83 chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc:83: content::WebContents* top_level_web_contents = On 2016/09/22 03:27:35, msw wrote: > ...
4 years, 3 months ago (2016-09-22 04:32:23 UTC) #4
msw
https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc File chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc#newcode83 chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc:83: content::WebContents* top_level_web_contents = On 2016/09/22 04:32:23, imcheng wrote: > ...
4 years, 3 months ago (2016-09-22 13:36:19 UTC) #5
wjmaclean
https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc File chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc#newcode89 chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc:89: top_level_web_contents) On 2016/09/22 13:36:19, msw on vacation 9-22 wrote: ...
4 years, 3 months ago (2016-09-22 15:36:48 UTC) #6
imcheng
Thanks for the review! https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc File chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc#newcode83 chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc:83: content::WebContents* top_level_web_contents = On 2016/09/22 ...
4 years, 3 months ago (2016-09-22 17:20:58 UTC) #7
msw
lgtm https://codereview.chromium.org/2357243003/diff/1/components/constrained_window/constrained_window_views.cc File components/constrained_window/constrained_window_views.cc (right): https://codereview.chromium.org/2357243003/diff/1/components/constrained_window/constrained_window_views.cc#newcode148 components/constrained_window/constrained_window_views.cc:148: content::WebContents* GetTopLevelWebContents( On 2016/09/22 17:20:58, imcheng wrote: > ...
4 years, 3 months ago (2016-09-22 20:45:17 UTC) #12
wjmaclean
lgtm
4 years, 3 months ago (2016-09-23 12:58:11 UTC) #13
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/2357243003/20001
4 years, 2 months ago (2016-09-23 16:55:09 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-09-23 17:01:03 UTC) #16
commit-bot: I haz the power
4 years, 2 months ago (2016-09-23 17:02:52 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c5eae4a12a589376be4c5d06fe4c356ee6d495a5
Cr-Commit-Position: refs/heads/master@{#420636}

Powered by Google App Engine
This is Rietveld 408576698