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

Issue 22429004: Refactor LauncherDelegate (Closed)

Created:
7 years, 4 months ago by simonhong_
Modified:
7 years, 3 months ago
CC:
chromium-reviews, sadrul, ben+watch_chromium.org, hyojun.im_lge.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactor LauncherDelegate (This CL is splitted from https://codereview.chromium.org/11513005/ prior to adding LauncherItem for dialog) Refactor LauncherItem bits in LauncherDelegate into LauncherItemDelegate. LauncherItemDelegateManager helps Launcher/LauncherView to choose right LauncherItemDelegate based on LauncherItemType. * AppListLauncherItemDelegate is added for TYPE_APP_LIST. * LauncherItemManager (subclass of LauncherItemDelegate) will be added for TYPE_DIALOG in the separate CL. R=sky@chromium.org, skuhne@chromium.org BUG=121242, 279105 TEST=browser_tests, unit_tests, ash_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219924

Patch Set 1 #

Patch Set 2 : test #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Add some comments #

Total comments: 35

Patch Set 6 : fix bugs #

Total comments: 6

Patch Set 7 : Modify comments #

Patch Set 8 : Rebased #

Total comments: 6

Patch Set 9 : Add AshLauncherDelegate #

Patch Set 10 : Add LauncherItemDelegateManager #

Total comments: 12

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : Fix copyright typo #

Patch Set 14 : Rebased #

Patch Set 15 : #

Total comments: 8

Patch Set 16 : Fix for OpenBrowserUsingShelfOnOhterDisplay fail #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -166 lines) Patch
M ash/ash.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
A ash/launcher/app_list_launcher_item_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +42 lines, -0 lines 0 comments Download
A ash/launcher/app_list_launcher_item_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +65 lines, -0 lines 0 comments Download
M ash/launcher/launcher.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M ash/launcher/launcher_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -61 lines 0 comments Download
A + ash/launcher/launcher_item_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +8 lines, -40 lines 0 comments Download
A ash/launcher/launcher_item_delegate_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
A ash/launcher/launcher_item_delegate_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +29 lines, -0 lines 0 comments Download
M ash/launcher/launcher_view.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M ash/launcher/launcher_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +52 lines, -36 lines 4 comments Download
M ash/shell.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -0 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M ash/shell/launcher_delegate_impl.h View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -9 lines 0 comments Download
M ash/shell/launcher_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M ash/test/test_launcher_delegate.h View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -8 lines 0 comments Download
M ash/test/test_launcher_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +18 lines, -9 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
simonhong_
Dear jamescook, Please take a look. Thank you. Simon.
7 years, 4 months ago (2013-08-10 06:44:37 UTC) #1
James Cook
What is the purpose of this change? Why do we need it? It seems to ...
7 years, 4 months ago (2013-08-12 21:45:27 UTC) #2
simonhong_
On 2013/08/12 21:45:27, James Cook wrote: > What is the purpose of this change? Why ...
7 years, 4 months ago (2013-08-12 22:40:21 UTC) #3
James Cook
On 2013/08/12 22:40:21, Simon YoungKi Hong wrote: > On 2013/08/12 21:45:27, James Cook wrote: > ...
7 years, 4 months ago (2013-08-13 17:33:38 UTC) #4
Mr4D (OOO till 08-26)
I have found a few bugs for you to fix. Beside that: The "ProxyLauncherDelegate" feels ...
7 years, 4 months ago (2013-08-13 18:18:24 UTC) #5
simonhong_
Dear Stefan, sky outlined what I should do and didn't reviewed specific implementation details yet. ...
7 years, 4 months ago (2013-08-13 19:54:56 UTC) #6
Mr4D (OOO till 08-26)
Please see my comments! https://codereview.chromium.org/22429004/diff/13001/ash/launcher/app_list_launcher_item_delegate.cc File ash/launcher/app_list_launcher_item_delegate.cc (right): https://codereview.chromium.org/22429004/diff/13001/ash/launcher/app_list_launcher_item_delegate.cc#newcode17 ash/launcher/app_list_launcher_item_delegate.cc:17: // TODO: Create AppList LauncherItem ...
7 years, 4 months ago (2013-08-14 15:52:18 UTC) #7
simonhong_
Dear Stefan, Please check again! Thank you for review. https://codereview.chromium.org/22429004/diff/13001/ash/launcher/app_list_launcher_item_delegate.cc File ash/launcher/app_list_launcher_item_delegate.cc (right): https://codereview.chromium.org/22429004/diff/13001/ash/launcher/app_list_launcher_item_delegate.cc#newcode17 ash/launcher/app_list_launcher_item_delegate.cc:17: ...
7 years, 4 months ago (2013-08-14 23:47:51 UTC) #8
Mr4D (OOO till 08-26)
https://codereview.chromium.org/22429004/diff/13001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc (right): https://codereview.chromium.org/22429004/diff/13001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc#newcode1033 chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc:1033: if (HasItemController(id)) So we plan that we do not ...
7 years, 4 months ago (2013-08-15 15:53:18 UTC) #9
Mr4D (OOO till 08-26)
Simon, please stop working on this for the moment since we need to circle back ...
7 years, 4 months ago (2013-08-15 20:25:45 UTC) #10
simonhong_
On 2013/08/15 20:25:45, Mr4D wrote: > Simon, > > please stop working on this for ...
7 years, 4 months ago (2013-08-15 22:53:55 UTC) #11
Mr4D (OOO till 08-26)
As discussed - since sky was guiding this CL for several months already we let ...
7 years, 4 months ago (2013-08-19 20:17:44 UTC) #12
James Cook
-me, since sky is an owner here. Re-add me if you need me
7 years, 4 months ago (2013-08-19 21:15:09 UTC) #13
simonhong_
Dear sky, I'll send rebased patch after removing PerBrowserLauncher. Thank you. Simon.
7 years, 4 months ago (2013-08-20 08:25:29 UTC) #14
simonhong_
Dear Sky, I updated this CL at patch set #8. Please take a look. Thank ...
7 years, 4 months ago (2013-08-23 07:41:38 UTC) #15
sky
https://codereview.chromium.org/22429004/diff/60002/ash/launcher/launcher.cc File ash/launcher/launcher.cc (right): https://codereview.chromium.org/22429004/diff/60002/ash/launcher/launcher.cc#newcode112 ash/launcher/launcher.cc:112: LauncherItemDelegate* item_delegate = Do we ever have a NULL ...
7 years, 4 months ago (2013-08-23 20:23:14 UTC) #16
simonhong_
Dear sky, How about using AshLauncherDelegate? It handles LauncherItemDelegate in ash and return right LauncherItemDelegate ...
7 years, 4 months ago (2013-08-23 21:53:20 UTC) #17
sky
On 2013/08/23 21:53:20, Simon YoungKi Hong wrote: > Dear sky, > How about using AshLauncherDelegate? ...
7 years, 4 months ago (2013-08-23 22:00:49 UTC) #18
simonhong_
AshLauncherDelegate is another LauncherDelegate not rename of LauncherDelegateProxy. I mean multiple LauncherDelegate in chrome and ...
7 years, 4 months ago (2013-08-23 22:06:33 UTC) #19
sky
I still like LauncherItemDelegateManager better than what you're suggesting. On Fri, Aug 23, 2013 at ...
7 years, 4 months ago (2013-08-23 22:38:42 UTC) #20
simonhong_
Dear sky, LauncherItemDelegateManager is created. Please check again. Thank you. Simon. https://codereview.chromium.org/22429004/diff/60002/ash/launcher/launcher.cc File ash/launcher/launcher.cc (right): ...
7 years, 4 months ago (2013-08-26 08:47:09 UTC) #21
sky
https://codereview.chromium.org/22429004/diff/82001/ash/launcher/app_list_launcher_item_delegate.cc File ash/launcher/app_list_launcher_item_delegate.cc (right): https://codereview.chromium.org/22429004/diff/82001/ash/launcher/app_list_launcher_item_delegate.cc#newcode18 ash/launcher/app_list_launcher_item_delegate.cc:18: // TODO(simon.hong81): This works for the moment, but the ...
7 years, 3 months ago (2013-08-27 00:03:46 UTC) #22
simonhong_
Dear sky, Please check again. https://codereview.chromium.org/22429004/diff/82001/ash/launcher/app_list_launcher_item_delegate.cc File ash/launcher/app_list_launcher_item_delegate.cc (right): https://codereview.chromium.org/22429004/diff/82001/ash/launcher/app_list_launcher_item_delegate.cc#newcode18 ash/launcher/app_list_launcher_item_delegate.cc:18: // TODO(simon.hong81): This works ...
7 years, 3 months ago (2013-08-27 01:05:29 UTC) #23
sky
LGTM
7 years, 3 months ago (2013-08-27 03:56:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/94001
7 years, 3 months ago (2013-08-27 04:55:32 UTC) #25
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=22516
7 years, 3 months ago (2013-08-27 05:12:07 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/102001
7 years, 3 months ago (2013-08-27 05:27:45 UTC) #27
commit-bot: I haz the power
Failed to apply patch for ash/ash.gyp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-08-27 05:27:52 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/109001
7 years, 3 months ago (2013-08-27 07:22:47 UTC) #29
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=148975
7 years, 3 months ago (2013-08-27 12:07:40 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/137001
7 years, 3 months ago (2013-08-27 12:23:26 UTC) #31
Mr4D (OOO till 08-26)
Much better then the original version! Thanks for doing this! lgtm (I suppose it is ...
7 years, 3 months ago (2013-08-27 15:00:52 UTC) #32
simonhong_
https://codereview.chromium.org/22429004/diff/137001/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/22429004/diff/137001/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc#newcode248 chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:248: if (ash::Shell::HasInstance()) On 2013/08/27 15:00:52, Mr4D wrote: > This ...
7 years, 3 months ago (2013-08-27 15:08:54 UTC) #33
Mr4D (OOO till 08-26)
Hmm. Well - in that case the least you should do is adding a comment ...
7 years, 3 months ago (2013-08-27 15:25:07 UTC) #34
simonhong_
Dear stefan, Would you please check again? I uploaded new patchset to pass OpenBrowserUsingShelfOnOhterDisplay. https://codereview.chromium.org/22429004/diff/137001/ash/launcher/launcher_item_delegate_manager.cc ...
7 years, 3 months ago (2013-08-27 21:51:59 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/160001
7 years, 3 months ago (2013-08-27 23:40:52 UTC) #36
Mr4D (OOO till 08-26)
Oshima, could you please have a quick look at the latest change from Simon in ...
7 years, 3 months ago (2013-08-28 00:06:06 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simon.hong81@gmail.com/22429004/160001
7 years, 3 months ago (2013-08-28 00:32:11 UTC) #38
simonhong_
https://codereview.chromium.org/22429004/diff/160001/ash/launcher/launcher_view.cc File ash/launcher/launcher_view.cc (right): https://codereview.chromium.org/22429004/diff/160001/ash/launcher/launcher_view.cc#newcode1648 ash/launcher/launcher_view.cc:1648: ShowListMenuForView(model_->items()[view_index], sender, event); On 2013/08/28 00:06:06, Mr4D wrote: > ...
7 years, 3 months ago (2013-08-28 00:33:58 UTC) #39
commit-bot: I haz the power
Change committed as 219924
7 years, 3 months ago (2013-08-28 05:22:43 UTC) #40
oshima
7 years, 3 months ago (2013-08-28 05:27:45 UTC) #41
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/22429004/diff/160001/ash/launcher/laun...
File ash/launcher/launcher_view.cc (right):

https://chromiumcodereview.appspot.com/22429004/diff/160001/ash/launcher/laun...
ash/launcher/launcher_view.cc:1648:
ShowListMenuForView(model_->items()[view_index], sender, event);
On 2013/08/28 00:33:58, Simon YoungKi Hong wrote:
> On 2013/08/28 00:06:06, Mr4D wrote:
> > Sorry, but did you test why this was failing?
> > 
> > This makes me worried. Because Oshima was working on this just a few weeks
> ago.
> > From my understanding of that change I think this should be fine, but he
> should
> > have a quick look at this.
> 
> Yes, I tested and found failing reason.
> Failing reason is calling ItemSelected() outside of ScopedTargetRootWindow
> scope.

Yes, that's correct fix.

Powered by Google App Engine
This is Rietveld 408576698