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

Issue 1838263002: Arc app integration in shelf launcher context menu (Closed)

Created:
4 years, 8 months ago by lgcheng
Modified:
4 years, 8 months ago
CC:
chromium-reviews, kalyank, sadrul, extensions-reviews_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

Implement base class for shelf launcher context menu. Implement subclasses of launcher context menu for extensions, Arc app and desktop shell. Half of the patch is for moving the implementation for extension from LancherContextMenu to its subclass ExtensionLancherContextMenu. BUG=http://b/27418199 TEST= Manual test on minnie after setting Arc to multi-window mode. Unit test covers menu item checks after the creation of DesktopShellLauncherContextMenu and ArcLauncherContextMenu. I am closing this cl. The issue is covered by two splitted cls 1. Pure refactor https://codereview.chromium.org/1857213004 2. Arc integration https://codereview.chromium.org/1869063002/

Patch Set 1 #

Patch Set 2 : nit #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : Refactor #

Total comments: 12

Patch Set 5 : Refactor and comments&inlucdes cleanup #

Total comments: 24

Patch Set 6 : Issue Correction #

Total comments: 6

Patch Set 7 : Nits update #

Total comments: 4

Patch Set 8 : Move implementation into right class #

Patch Set 9 : Comment update #

Total comments: 2

Patch Set 10 : Nits #

Patch Set 11 : Rebase #

Total comments: 18

Patch Set 12 : Member method privay update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+596 lines, -239 lines) Patch
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.cc View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc View 1 2 3 4 5 6 7 8 9 1 chunk +220 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.h View 1 2 3 4 5 6 7 8 3 chunks +42 lines, -21 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +93 lines, -216 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc View 1 2 3 4 5 3 chunks +66 lines, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (45 generated)
lgcheng
PTAL
4 years, 8 months ago (2016-03-29 20:18:42 UTC) #5
khmel
https://codereview.chromium.org/1838263002/diff/40001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/40001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc#newcode45 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc:45: return l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_ACTIVATE_ARC); Why do you need return label here? ...
4 years, 8 months ago (2016-03-29 20:31:27 UTC) #6
lgcheng
PTAL. Previous issues fixed. https://codereview.chromium.org/1838263002/diff/40001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/40001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc#newcode45 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc:45: return l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_ACTIVATE_ARC); On 2016/03/29 20:31:27, ...
4 years, 8 months ago (2016-03-29 22:02:16 UTC) #7
khmel
Sorry, has no time to pass through all review, Please process comments so far, pay ...
4 years, 8 months ago (2016-03-29 22:11:17 UTC) #8
lgcheng
PTAL. Fix previous issues and several self check and correction https://codereview.chromium.org/1838263002/diff/60001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/60001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc#newcode7 ...
4 years, 8 months ago (2016-03-30 00:01:53 UTC) #15
khmel
https://codereview.chromium.org/1838263002/diff/180001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/180001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc#newcode23 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc:23: AddItem(MENU_OPEN_NEW, Please use AddItemWithStringId (and at other places). You ...
4 years, 8 months ago (2016-03-30 00:58:46 UTC) #16
lgcheng
PTAL when free. Issue fixed. https://codereview.chromium.org/1838263002/diff/180001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/180001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc#newcode23 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc:23: AddItem(MENU_OPEN_NEW, On 2016/03/30 00:58:46, ...
4 years, 8 months ago (2016-03-30 02:06:26 UTC) #18
khmel
Please see my comments, At this stage you may add OWNER to review. https://codereview.chromium.org/1838263002/diff/190012/chrome/browser/ui/ash/launcher/launcher_context_menu.cc File ...
4 years, 8 months ago (2016-03-31 18:23:13 UTC) #19
lgcheng
Fix the issues. Hi Stephen, PTAL at this path. It is context menu implementation for ...
4 years, 8 months ago (2016-03-31 21:15:19 UTC) #21
khmel
lgtm with comments Deffer to OWNERs https://codereview.chromium.org/1838263002/diff/230001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/230001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc#newcode151 chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc:151: case MENU_AUTO_HIDE: Please ...
4 years, 8 months ago (2016-03-31 21:41:58 UTC) #22
lgcheng
PTAL. Fix last issues https://codereview.chromium.org/1838263002/diff/230001/chrome/browser/ui/ash/launcher/launcher_context_menu.cc File chrome/browser/ui/ash/launcher/launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/230001/chrome/browser/ui/ash/launcher/launcher_context_menu.cc#newcode95 chrome/browser/ui/ash/launcher/launcher_context_menu.cc:95: return false; On 2016/03/31 21:41:57, ...
4 years, 8 months ago (2016-03-31 22:47:25 UTC) #23
khmel
https://codereview.chromium.org/1838263002/diff/250001/chrome/browser/ui/ash/launcher/launcher_context_menu.cc File chrome/browser/ui/ash/launcher/launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/250001/chrome/browser/ui/ash/launcher/launcher_context_menu.cc#newcode93 chrome/browser/ui/ash/launcher/launcher_context_menu.cc:93: case LAUNCH_TYPE_PINNED_TAB: As discussed, please handle extension specific commands ...
4 years, 8 months ago (2016-03-31 22:53:53 UTC) #24
lgcheng
Move the implementation back to the right class. Make sure commandid falls into right piece ...
4 years, 8 months ago (2016-03-31 23:18:10 UTC) #26
Mr4D (OOO till 08-26)
Nice! LGTM. Sorry for the late reply, but I was OOO. https://codereview.chromium.org/1838263002/diff/280001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc (right): ...
4 years, 8 months ago (2016-04-04 15:58:07 UTC) #27
lgcheng
Nits Fixed! Thanks for review! https://codereview.chromium.org/1838263002/diff/280001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/280001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc#newcode52 chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc:52: AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); On 2016/04/04 ...
4 years, 8 months ago (2016-04-04 16:06:42 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838263002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838263002/300001
4 years, 8 months ago (2016-04-04 16:07:07 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/153737) ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-04 16:10:01 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838263002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838263002/360001
4 years, 8 months ago (2016-04-04 18:04:48 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-04 19:13:37 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838263002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838263002/360001
4 years, 8 months ago (2016-04-04 19:29:43 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/164246)
4 years, 8 months ago (2016-04-04 19:40:36 UTC) #46
lgcheng
Hi Steven, Can you help me to take a look at this patch. It is ...
4 years, 8 months ago (2016-04-04 19:40:58 UTC) #48
lgcheng
Forget to mark PTAL Thanks, Long
4 years, 8 months ago (2016-04-04 19:43:32 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838263002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838263002/360001
4 years, 8 months ago (2016-04-05 01:21:43 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-05 01:33:01 UTC) #55
stevenjb
https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h (right): https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h#newcode24 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h:24: ~ArcLauncherContextMenu() override; blank line https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h#newcode25 chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h:25: void Init(); Can ...
4 years, 8 months ago (2016-04-06 00:06:49 UTC) #56
lgcheng
Hi Steven, Thanks for your comment! PTAL at my updates. Thanks, Long https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h File chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h ...
4 years, 8 months ago (2016-04-06 17:02:43 UTC) #70
stevenjb
https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc#newcode39 chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc:39: void ExtensionLauncherContextMenu::Init() { On 2016/04/06 17:02:42, lgcheng wrote: > ...
4 years, 8 months ago (2016-04-06 17:16:56 UTC) #71
lgcheng
PTAL at my update. Thanks, Long https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc (right): https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc#newcode39 chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc:39: void ExtensionLauncherContextMenu::Init() { ...
4 years, 8 months ago (2016-04-06 18:04:19 UTC) #72
stevenjb
That's fine, we can ignore the bogus diff for the new file(s). I've had to ...
4 years, 8 months ago (2016-04-06 18:09:18 UTC) #73
lgcheng
4 years, 8 months ago (2016-04-06 21:54:03 UTC) #74
On 2016/04/06 18:09:18, stevenjb wrote:
> That's fine, we can ignore the bogus diff for the new file(s). I've had to
> do that before. I think that is better than attempting to review a "fake
> cl".
> 
> 
> 
> On Wed, Apr 6, 2016 at 11:04 AM, <mailto:lgcheng@google.com> wrote:
> 
> > PTAL at my update.
> >
> > Thanks,
> >
> > Long
> >
> >
> >
> >
>
https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/...
> > File chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
> > (right):
> >
> >
> >
>
https://codereview.chromium.org/1838263002/diff/360001/chrome/browser/ui/ash/...
> > chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc:39:
> > void ExtensionLauncherContextMenu::Init() {
> > On 2016/04/06 17:16:55, stevenjb wrote:
> > > On 2016/04/06 17:02:42, lgcheng wrote:
> > > > On 2016/04/06 00:06:49, stevenjb wrote:
> > > > > Can you try using a lower --similarity value with git cl upload so
> > that we
> > > can
> > > > > maybe get a diff from launcher_context_menu.cc? I assume this
> > logic hasn't
> > > > > changed?
> > > >
> > > > This logic is not changed, but I change the implementation a little:
> > > > In original implementation, it was:
> > > > if (item_.id != 0) {
> > > > details chunk.......
> > > > }
> > > >
> > > > Now there is no need to check item id in this function, so the
> > details chunk
> > > is
> > > > moved 2 spaces forward, causing git sees the whole chunk as new
> > > implementation.
> > > > Direct access to private member item_ , controller_, shelf_ in
> > original
> > > > implementation is also changed to protected method of base class
> > item(),
> > > > controller(), shelf(). These make the similarity of
> > > > ExtensionLauncherContextMenu.cc and LauncherContextMenu.cc very low.
> > > >
> > > > I need to set the similarity value really low(26%) to make git treat
> > > > launcher_context_menu.cc as the base file of
> > > extension_launcher_context_menu.cc.
> > > > But this would cause some head files treat unrelated SimpleMenuModel
> > > subclass's
> > > > head files(other contextmenu implementation, e.g applist
> > contextmenu) in other
> > > > directory as base files, which would also annoy the review. Do you
> > have any
> > > > suggestions?
> > >
> > > I think the thing to do then is to split this CL up:
> > > a) Everything except the addition of arc_launcher_context_menu.* (and
> > the
> > > changes integrating it)
> > > b) Add arc_launcher_context_menu.*
> > >
> > > Then you can use a low similarity value for a) and a normal one for
> > b).
> > >
> > > Otherwise reviewing the changes ot this file is going to be a lot more
> > work.
> >
> > Ignoring Arc related updates.
> > When I try to lower the similarity threshold (30%), the head file of
> > extension implementation itself first detects unrelated head file as
> > base file. (See detail below)
> >
> > chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
> > | 220
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > chrome/browser/ui/{app_list/extension_app_context_menu.h =>
> > ash/launcher/extension_launcher_context_menu.h} | 55 ++++++--------
> >
> >
> >
>
---------------------------------------------------------------------------------------------
> > Which means even if I split the Arc related code out of this cl, it
> > still doesn't work.
> > Is it possible that we have this workaround.
> > I create a "fake cl" only for review with only one file
> > extension_launcher_context_menu.cc. lower the threshold so that
> > launcher_context_menu.cc can be detected as base file of this for you to
> > review and leave this cl unchanged?
> > Otherwise, I can't find a clean solution (I have asked everybody around
> > for ideas, but none has a clean solution either).
> >
> > What do you suggest?
> >
> > Thanks
> >
> > https://codereview.chromium.org/1838263002/
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

https://codereview.chromium.org/1857213004/# Arc free split of this patch.

Powered by Google App Engine
This is Rietveld 408576698