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

Issue 10905201: Move app list (Closed)

Created:
8 years, 3 months ago by DaveMoore
Modified:
8 years, 3 months ago
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Move app list BUG=141378 TEST=app list icon should always be leftmost Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156092

Patch Set 1 #

Patch Set 2 : Remove extra nl #

Total comments: 13

Patch Set 3 : review issues #

Patch Set 4 : review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -108 lines) Patch
M ash/launcher/launcher_model.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M ash/launcher/launcher_model_unittest.cc View 1 2 3 1 chunk +20 lines, -16 lines 0 comments Download
M ash/launcher/launcher_navigator_unittest.cc View 1 2 3 3 chunks +12 lines, -13 lines 0 comments Download
M ash/launcher/launcher_view.cc View 1 2 5 chunks +12 lines, -17 lines 0 comments Download
M ash/launcher/launcher_view_unittest.cc View 1 2 10 chunks +65 lines, -33 lines 0 comments Download
M ash/test/launcher_view_test_api.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ash/wm/panel_layout_manager_unittest.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 2 8 chunks +8 lines, -16 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc View 1 2 5 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
DaveMoore
8 years, 3 months ago (2012-09-10 23:59:18 UTC) #1
sky
https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_view.cc File ash/launcher/launcher_view.cc (right): https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_view.cc#newcode445 ash/launcher/launcher_view.cc:445: view_model_->set_ideal_bounds(last_view_index, last_view_bounds); Is this code needed anymore (438 and ...
8 years, 3 months ago (2012-09-11 00:18:32 UTC) #2
Mattias Nissler (ping if slow)
https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_model_unittest.cc File ash/launcher/launcher_model_unittest.cc (right): https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_model_unittest.cc#newcode203 ash/launcher/launcher_model_unittest.cc:203: // Browser shortcut and app list should still be ...
8 years, 3 months ago (2012-09-11 08:42:30 UTC) #3
DaveMoore
https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_model_unittest.cc File ash/launcher/launcher_model_unittest.cc (right): https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launcher_model_unittest.cc#newcode203 ash/launcher/launcher_model_unittest.cc:203: // Browser shortcut and app list should still be ...
8 years, 3 months ago (2012-09-11 17:07:00 UTC) #4
sky
LGTM
8 years, 3 months ago (2012-09-11 18:13:29 UTC) #5
Mattias Nissler (ping if slow)
8 years, 3 months ago (2012-09-12 12:08:18 UTC) #6
https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launch...
File ash/launcher/launcher_view.cc (right):

https://chromiumcodereview.appspot.com/10905201/diff/2001/ash/launcher/launch...
ash/launcher/launcher_view.cc:727: if (modified_index ==
view_model_->view_size())
On 2012/09/11 17:07:00, DaveMoore wrote:
> Updated comment. There's a case that existed before where we return -1 if
we're
> adding a new view to the middle while dragging. @mattias, I believe this is
your
> code. Should it be -1?

I fail to follow the case you're describing. If we're inserting something to the
middle, we have 0 <= modified_index < view_model_->view_size(), and the code
below will not return -1.

The return value should be the new position of the view previously at
modified_index.

The check you added is required good to cover the case of appending, in which
case we would have incorrectly returned -1, whereas the insertion position after
cancelling the drag is still at the end of the model. This hasn't been a problem
thus far since the app list was last, so we never appended.

I suggest you make the check a >= though (which should never happen, but
returning -1 in these cases is certainly not correct).

Regarding the code below, would you mind renaming |removed_view| to
|modified_view|? I should have changed it when moving the code but obviously
missed it.

> 
> On 2012/09/11 00:18:32, sky wrote:
> > Your comment implies that if 727 is true then we're adding a new item. But
> isn't
> > 727 only true if adding an item at the end?
>

Powered by Google App Engine
This is Rietveld 408576698