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

Issue 1430023002: Enable AutoResize for Constrained Web Dialogs for Mac. (Closed)

Created:
5 years, 1 month ago by apacible
Modified:
5 years, 1 month ago
Reviewers:
erikchen, Nico
CC:
chromium-reviews, extensions-reviews_chromium.org, rouslan+autofill_chromium.org, jdonnelly+autofillwatch_chromium.org, bondd+autofillwatch_chromium.org, estade+watch_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable AutoResize for Constrained Web Dialogs for Mac. Currently only constrained web dialogs for views (Linux/Windows) are able to autoresize. This change implements the option to pass in minimum and maximum sizes and enabling autoresizing functionality for OSX. This change adds two static functions for options on whether to create a ConstrainedWindowsMac that autoresizes or is of fixed size. BUG=217034 Committed: https://crrev.com/0dbc8ff6d68291773b8b233a19e399d00f9262b0 Cr-Commit-Position: refs/heads/master@{#359497}

Patch Set 1 : #

Total comments: 34

Patch Set 2 : Changes per erikchen@'s comments. #

Total comments: 4

Patch Set 3 : Changes per erikchen@'s comments. #

Total comments: 6

Patch Set 4 : Changes per erikchen@'s comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -55 lines) Patch
M chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac.mm View 1 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm View 1 2 3 7 chunks +137 lines, -17 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm View 1 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 chunks +25 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 2 chunks +34 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm View 1 4 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/device_permissions_dialog_controller.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/login_prompt_cocoa.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_cocoa.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac.mm View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm View 1 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_views_mac.mm View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_ui.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc View 2 6 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 63 (41 generated)
apacible
PTAL, thanks!
5 years, 1 month ago (2015-11-10 19:31:05 UTC) #36
apacible
+erikchen PTAL, thanks!
5 years, 1 month ago (2015-11-11 19:02:20 UTC) #38
erikchen
https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm File chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm (right): https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm#newcode32 chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm:32: class InitiatorWebContentsObserver What's the point of this class? Why ...
5 years, 1 month ago (2015-11-11 21:22:31 UTC) #41
apacible
https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm File chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm (right): https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm#newcode32 chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm:32: class InitiatorWebContentsObserver On 2015/11/11 21:22:30, erikchen wrote: > What's ...
5 years, 1 month ago (2015-11-12 02:02:24 UTC) #43
apacible
https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc File chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc (left): https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc#oldcode177 chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc:177: EXPECT_EQ(gfx::Size(), web_contents->GetPreferredSize()); On 2015/11/12 02:02:24, apacible wrote: > On ...
5 years, 1 month ago (2015-11-12 18:21:49 UTC) #44
erikchen
https://codereview.chromium.org/1430023002/diff/590001/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/1430023002/diff/590001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode70 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:70: id<ConstrainedWindowSheet> sheet_; Instead of using an id (raw pointer), ...
5 years, 1 month ago (2015-11-12 18:31:27 UTC) #45
apacible
I opted to switch back to the previous changes for tests; see earlier comment thread. ...
5 years, 1 month ago (2015-11-12 21:57:42 UTC) #46
erikchen
https://codereview.chromium.org/1430023002/diff/610001/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/1430023002/diff/610001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode71 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:71: base::scoped_nsobject<id> sheet_; using scoped_nsprotocol should allow you to retain ...
5 years, 1 month ago (2015-11-12 22:14:58 UTC) #47
apacible
https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm File chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm (right): https://codereview.chromium.org/1430023002/diff/550001/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm#newcode157 chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm:157: if (!max_size_.IsEmpty()) On 2015/11/12 02:02:23, apacible wrote: > On ...
5 years, 1 month ago (2015-11-13 00:04:01 UTC) #49
erikchen
lgtm
5 years, 1 month ago (2015-11-13 00:21:24 UTC) #50
apacible
Thanks! Nico, PTAL for OWNER, thanks!
5 years, 1 month ago (2015-11-13 00:44:44 UTC) #51
Nico
is there any test coverage for the new functionality added in this patch?
5 years, 1 month ago (2015-11-13 01:37:20 UTC) #52
apacible
On 2015/11/13 01:37:20, Nico wrote: > is there any test coverage for the new functionality ...
5 years, 1 month ago (2015-11-13 04:06:14 UTC) #53
Nico
Ah, I missed that, thanks! In that case, rs-lgtm :-)
5 years, 1 month ago (2015-11-13 04:42:51 UTC) #54
apacible
Thanks!
5 years, 1 month ago (2015-11-13 05:39:47 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1430023002/650001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1430023002/650001
5 years, 1 month ago (2015-11-13 05:40:12 UTC) #57
commit-bot: I haz the power
Committed patchset #4 (id:650001)
5 years, 1 month ago (2015-11-13 05:45:39 UTC) #58
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/0dbc8ff6d68291773b8b233a19e399d00f9262b0 Cr-Commit-Position: refs/heads/master@{#359497}
5 years, 1 month ago (2015-11-13 05:46:54 UTC) #59
cbiesinger
So I'm only a blink sheriff, not chromium, but this may have broken browser_tests: https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests/builds/11410 ...
5 years, 1 month ago (2015-11-13 19:00:42 UTC) #60
erikchen
On 2015/11/13 19:00:42, cbiesinger wrote: > So I'm only a blink sheriff, not chromium, but ...
5 years, 1 month ago (2015-11-13 19:02:06 UTC) #61
apacible
On 2015/11/13 19:02:06, erikchen wrote: > On 2015/11/13 19:00:42, cbiesinger wrote: > > So I'm ...
5 years, 1 month ago (2015-11-13 19:08:59 UTC) #62
apacible
5 years, 1 month ago (2015-11-13 19:10:09 UTC) #63
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:650001) has been created in
https://codereview.chromium.org/1440173003/ by apacible@chromium.org.

The reason for reverting is: This is breaking Mac10.9 browser_tests:

https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests/builds/11410
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests/builds/114....

Powered by Google App Engine
This is Rietveld 408576698