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

Issue 533883002: [Mac] Re-layout download shelf when danger state of item changes. (Closed)

Created:
6 years, 3 months ago by asanka
Modified:
6 years, 3 months ago
Reviewers:
Nico
CC:
chromium-reviews, benjhayden+dwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Mac] Re-layout download shelf when danger state of item changes. Updating the width of the DownloadItemController view is not sufficient since the sibling items also need to be moved around. In addition, the width of DownloadItemController view should be set based on its preferred size (already done by DownloadShelfController:layoutItems) rather than relative to its current frame. This is because the DownloadItemController may be in the middle of an animation, and thus its frame may not reflect its desired size. While we are at it, add some unit tests for DownloadItemController, refactor the user experience event logic, and deal with the possibility that the DownloadItem and the DownloadItemController may be destroyed at different times. BUG=409999 Committed: https://crrev.com/bc3dd93004f36e6ad0662d0ecf8819c55dddc479 Cr-Commit-Position: refs/heads/master@{#295401}

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 6

Patch Set 3 : Fix lifetime issues and add more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -25 lines) Patch
M chrome/browser/ui/cocoa/download/download_item_controller.h View 1 2 3 chunks +38 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_controller.mm View 1 2 8 chunks +29 lines, -20 lines 0 comments Download
A chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm View 1 2 1 chunk +176 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_mac.mm View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
asanka
6 years, 3 months ago (2014-09-02 20:26:55 UTC) #2
Nico
lgtm (maybe a test would've been nice)
6 years, 3 months ago (2014-09-03 15:19:04 UTC) #3
asanka
On 2014/09/03 15:19:04, Nico (hiding) wrote: > lgtm > > (maybe a test would've been ...
6 years, 3 months ago (2014-09-04 00:44:08 UTC) #4
asanka
On 2014/09/04 00:44:08, asanka wrote: > On 2014/09/03 15:19:04, Nico (hiding) wrote: > > lgtm ...
6 years, 3 months ago (2014-09-04 14:36:18 UTC) #5
asanka
On 2014/09/04 14:36:18, asanka wrote: > On 2014/09/04 00:44:08, asanka wrote: > > On 2014/09/03 ...
6 years, 3 months ago (2014-09-11 19:00:25 UTC) #6
mattm
On 2014/09/11 19:00:25, asanka wrote: > On 2014/09/04 14:36:18, asanka wrote: > > On 2014/09/04 ...
6 years, 3 months ago (2014-09-16 17:49:30 UTC) #7
Nico
Thanks for adding a test! Mostly lgtm, one comment about memory management below. https://codereview.chromium.org/533883002/diff/20001/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm File ...
6 years, 3 months ago (2014-09-16 22:48:14 UTC) #8
asanka
https://codereview.chromium.org/533883002/diff/20001/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm File chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm (right): https://codereview.chromium.org/533883002/diff/20001/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm#newcode22 chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm:22: @interface DownloadItemController (DownloadItemControllerTest) { On 2014/09/16 22:48:14, Nico (hiding) ...
6 years, 3 months ago (2014-09-18 01:48:53 UTC) #9
Nico
lgtm!
6 years, 3 months ago (2014-09-18 01:50:47 UTC) #10
asanka
On 2014/09/18 01:50:47, Nico (hiding) wrote: > lgtm! Thanks!
6 years, 3 months ago (2014-09-18 02:01:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/533883002/40001
6 years, 3 months ago (2014-09-18 02:20:00 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001) as ba2985021f3d309a302f87b564e7c34b371d7555
6 years, 3 months ago (2014-09-18 02:44:53 UTC) #14
commit-bot: I haz the power
6 years, 3 months ago (2014-09-18 02:45:28 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/bc3dd93004f36e6ad0662d0ecf8819c55dddc479
Cr-Commit-Position: refs/heads/master@{#295401}

Powered by Google App Engine
This is Rietveld 408576698