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

Issue 2819413003: Refactor extension app icon. (Closed)

Created:
3 years, 8 months ago by khmel
Modified:
3 years, 7 months ago
Reviewers:
xiyuan, Devlin, msw
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, extensions-reviews_chromium.org, sadrul, yusukes+watch_chromium.org, tfarina, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, victorhsieh+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, Matt Giuca, tbarzic
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor extension app icon. We have several independent places where we decided how extension icon is represented. We have separate logic for the shelf, recent view, app list and app info icons. Icon look depends on type of app and some external conditions. This leads to situation that extension App icon looks differently in different places. Yet another problem is non-stable applying Chrome badging in case corresponded ARC app is installed or uninstalled. Solution is to provide centrilized place where app icon is processed and all consumers should use. ChromeAppIcon is introduced that applies all necessary effects based on current environment and app type. ChromeAppIconService is introduced to refer all created icons, monitor environment changes and updating the icon. Resulting icon image is sent to consumer via ChromeAppIconDelegate interface. BUG=712729 BUG=703366 BUG=b/37418449 Test=Manually on device. Existing tests passed. TBR=yoshiki@chromium.org Review-Url: https://codereview.chromium.org/2819413003 Cr-Commit-Position: refs/heads/master@{#471035} Committed: https://chromium.googlesource.com/chromium/src/+/8c1f6622f0279ee6062496672a7b83317b579486

Patch Set 1 #

Total comments: 29

Patch Set 2 : Xiyuan's comments, extra unit tests + fix one more issue with badging #

Total comments: 2

Patch Set 3 : fixed tests on non-CrOS (use app_list deps only in CrOS) #

Total comments: 23

Patch Set 4 : nits + IconRelease unit test #

Patch Set 5 : tiny nit #

Total comments: 4

Patch Set 6 : nits #

Total comments: 34

Patch Set 7 : rebase #

Patch Set 8 : Devlin's comments #

Total comments: 20

Patch Set 9 : comments addressed (without renaming) #

Patch Set 10 : rename ExtensionAppIcon -> ChromeAppIcon #

Total comments: 6

Patch Set 11 : rebase + nit #

Total comments: 71

Patch Set 12 : msw@ comments addressed #

Patch Set 13 : rebase #

Total comments: 56

Patch Set 14 : nits #

Total comments: 5

Patch Set 15 : nits #

Patch Set 16 : rebase/retested #

Total comments: 2

Patch Set 17 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1169 lines, -462 lines) Patch
M chrome/browser/chromeos/extensions/gfx_utils.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/notification_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/file_system/request_file_system_notification.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +131 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_loader.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +79 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +91 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_service_factory.h View 1 2 3 4 5 6 7 8 9 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_service_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_app_icon_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +365 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_app_icon_loader.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -53 lines 0 comments Download
M chrome/browser/extensions/extension_app_icon_loader.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -111 lines 0 comments Download
M chrome/browser/notifications/application_notifier_source.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/notifications/application_notifier_source.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_icon_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_app_list_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +20 lines, -7 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_package_syncable_service.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/extension_app_item.h View 1 2 3 4 5 6 7 8 9 7 chunks +7 lines, -13 lines 0 comments Download
M chrome/browser/ui/app_list/extension_app_item.cc View 1 2 3 4 5 6 7 8 9 5 chunks +11 lines, -107 lines 0 comments Download
M chrome/browser/ui/app_list/extension_app_model_builder.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/extension_app_model_builder.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/app_list/search/extension_app_result.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -13 lines 0 comments Download
M chrome/browser/ui/app_list/search/extension_app_result.cc View 1 2 3 4 5 6 7 8 9 6 chunks +8 lines, -45 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -2 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 12 13 14 15 1 chunk +0 lines, -2 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 +4 lines, -12 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_extension_app_updater.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_extension_app_updater.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -25 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.h View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -25 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/app_list/Extensions/emfkafnhnpcmabnnkckkchdilgeoekbo/1.0/icon_128.png View 1 Binary file 0 comments Download
M chrome/test/data/extensions/app_list/Extensions/emfkafnhnpcmabnnkckkchdilgeoekbo/1.0/manifest.json View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/app_list/Preferences View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (31 generated)
khmel
Hi Xiyuan, May I ask you to perform high level review in order to make ...
3 years, 8 months ago (2017-04-18 17:15:46 UTC) #2
xiyuan
The approach looks fine with me. Not sure what is the best home for ExtensionAppIcon ...
3 years, 8 months ago (2017-04-18 20:43:01 UTC) #3
khmel
Thank you Xiyuan for your comments! As recommended, adding rdevlin.cronin@ for top level review. Hi ...
3 years, 8 months ago (2017-04-18 20:45:25 UTC) #5
khmel
Hi Xiyuan, I addressed your comments + provided required unit tests. I postponed moving ExtensionAppIcon ...
3 years, 8 months ago (2017-04-20 00:13:38 UTC) #6
xiyuan
Mostly nits. https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_service.cc File chrome/browser/extensions/extension_app_icon_service.cc (right): https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_service.cc#newcode64 chrome/browser/extensions/extension_app_icon_service.cc:64: registry->AddObserver(this); nit: get rid of |registry| and ...
3 years, 8 months ago (2017-04-20 16:36:32 UTC) #13
khmel
Thanks for your comments, PTAL updated version https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_service.cc File chrome/browser/extensions/extension_app_icon_service.cc (right): https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_service.cc#newcode64 chrome/browser/extensions/extension_app_icon_service.cc:64: registry->AddObserver(this); On ...
3 years, 8 months ago (2017-04-20 17:46:19 UTC) #16
xiyuan
lgtm https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_unittest.cc File chrome/browser/extensions/extension_app_icon_unittest.cc (right): https://codereview.chromium.org/2819413003/diff/40001/chrome/browser/extensions/extension_app_icon_unittest.cc#newcode56 chrome/browser/extensions/extension_app_icon_unittest.cc:56: icon_updated_callback_.Reset(); On 2017/04/20 17:46:18, khmel wrote: > On ...
3 years, 8 months ago (2017-04-20 17:52:46 UTC) #17
khmel
Thank you Xiyuan! Adding msw@ (c/b/ui/views c/b/ui/ash) PTAL https://codereview.chromium.org/2819413003/diff/80001/chrome/browser/extensions/extension_app_icon.cc File chrome/browser/extensions/extension_app_icon.cc (right): https://codereview.chromium.org/2819413003/diff/80001/chrome/browser/extensions/extension_app_icon.cc#newcode10 chrome/browser/extensions/extension_app_icon.cc:10: #include ...
3 years, 8 months ago (2017-04-20 18:01:11 UTC) #18
khmel
Hi Mike, PTAL Thanks
3 years, 8 months ago (2017-04-20 18:01:34 UTC) #20
msw
I'm hoping Devlin or someone else more familiar with extension icon details will take a ...
3 years, 8 months ago (2017-04-20 18:49:23 UTC) #21
xiyuan
On 2017/04/20 18:49:23, msw wrote: > I'm hoping Devlin or someone else more familiar with ...
3 years, 8 months ago (2017-04-20 18:53:50 UTC) #22
Devlin
https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon_service.h File chrome/browser/extensions/extension_app_icon_service.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon_service.h#newcode30 chrome/browser/extensions/extension_app_icon_service.h:30: class ExtensionAppIconService : public KeyedService, Do we even need ...
3 years, 8 months ago (2017-04-20 20:17:41 UTC) #23
khmel
https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon_service.h File chrome/browser/extensions/extension_app_icon_service.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon_service.h#newcode30 chrome/browser/extensions/extension_app_icon_service.h:30: class ExtensionAppIconService : public KeyedService, On 2017/04/20 20:17:41, Devlin ...
3 years, 8 months ago (2017-04-20 20:21:53 UTC) #24
khmel
Hi Devlin, Would you find a chance to take a look? Thanks!
3 years, 8 months ago (2017-04-26 20:22:12 UTC) #25
Devlin
Sorry for the delay! https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h File chrome/browser/extensions/extension_app_icon.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h#newcode26 chrome/browser/extensions/extension_app_icon.h:26: // This represents how an ...
3 years, 8 months ago (2017-04-26 22:41:58 UTC) #26
khmel
Thank you for comments. Please find updated version https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h File chrome/browser/extensions/extension_app_icon.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h#newcode26 chrome/browser/extensions/extension_app_icon.h:26: // ...
3 years, 8 months ago (2017-04-27 00:18:12 UTC) #27
Devlin
https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h File chrome/browser/extensions/extension_app_icon.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h#newcode31 chrome/browser/extensions/extension_app_icon.h:31: class ExtensionAppIcon : public extensions::IconImage::Observer { On 2017/04/27 00:18:12, ...
3 years, 7 months ago (2017-05-01 14:51:11 UTC) #28
khmel
Thanks Devlin for comments PTAL updated version https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h File chrome/browser/extensions/extension_app_icon.h (right): https://codereview.chromium.org/2819413003/diff/100001/chrome/browser/extensions/extension_app_icon.h#newcode31 chrome/browser/extensions/extension_app_icon.h:31: class ExtensionAppIcon ...
3 years, 7 months ago (2017-05-01 20:18:19 UTC) #31
Devlin
extensions lgtm. I'm not familiar with the buildbot files, but if that's an intentional change, ...
3 years, 7 months ago (2017-05-01 21:40:56 UTC) #32
khmel
Thank you Devlin for review! Mike, PTAL Thanks https://codereview.chromium.org/2819413003/diff/220001/chrome/browser/extensions/chrome_app_icon.cc File chrome/browser/extensions/chrome_app_icon.cc (right): https://codereview.chromium.org/2819413003/diff/220001/chrome/browser/extensions/chrome_app_icon.cc#newcode44 chrome/browser/extensions/chrome_app_icon.cc:44: std::max((int)std::round(2.0 ...
3 years, 7 months ago (2017-05-02 01:03:52 UTC) #37
msw
I didn't get through the whole CL, but wanted to send what comments and questions ...
3 years, 7 months ago (2017-05-03 01:17:39 UTC) #42
khmel
Thank you Mike for comments. Please see my responses and updated version. >> Perhaps someone ...
3 years, 7 months ago (2017-05-03 02:15:23 UTC) #43
khmel
Rebased code. Mike, gentle ping. Thanks!
3 years, 7 months ago (2017-05-05 16:38:12 UTC) #46
msw
https://codereview.chromium.org/2819413003/diff/280001/chrome/browser/chromeos/extensions/gfx_utils.cc File chrome/browser/chromeos/extensions/gfx_utils.cc (right): https://codereview.chromium.org/2819413003/diff/280001/chrome/browser/chromeos/extensions/gfx_utils.cc#newcode97 chrome/browser/chromeos/extensions/gfx_utils.cc:97: // Used in unit tests. On 2017/05/03 02:15:21, khmel ...
3 years, 7 months ago (2017-05-08 19:59:54 UTC) #49
khmel
https://codereview.chromium.org/2819413003/diff/280001/chrome/browser/chromeos/extensions/gfx_utils.cc File chrome/browser/chromeos/extensions/gfx_utils.cc (right): https://codereview.chromium.org/2819413003/diff/280001/chrome/browser/chromeos/extensions/gfx_utils.cc#newcode97 chrome/browser/chromeos/extensions/gfx_utils.cc:97: // Used in unit tests. On 2017/05/08 19:59:53, msw ...
3 years, 7 months ago (2017-05-09 00:05:06 UTC) #50
msw
Thanks for your patience with my feedback. Please reconsider merging the service and loader. https://codereview.chromium.org/2819413003/diff/320001/chrome/browser/extensions/chrome_app_icon.h ...
3 years, 7 months ago (2017-05-10 19:05:22 UTC) #51
khmel
https://codereview.chromium.org/2819413003/diff/320001/chrome/browser/extensions/chrome_app_icon.h File chrome/browser/extensions/chrome_app_icon.h (right): https://codereview.chromium.org/2819413003/diff/320001/chrome/browser/extensions/chrome_app_icon.h#newcode30 chrome/browser/extensions/chrome_app_icon.h:30: class ChromeAppIcon : public IconImage::Observer { On 2017/05/10 19:05:21, ...
3 years, 7 months ago (2017-05-10 20:26:23 UTC) #52
khmel
https://codereview.chromium.org/2819413003/diff/320001/chrome/browser/extensions/chrome_app_icon_delegate.h File chrome/browser/extensions/chrome_app_icon_delegate.h (right): https://codereview.chromium.org/2819413003/diff/320001/chrome/browser/extensions/chrome_app_icon_delegate.h#newcode12 chrome/browser/extensions/chrome_app_icon_delegate.h:12: class ChromeAppIconDelegate { On 2017/05/10 19:05:21, msw wrote: > ...
3 years, 7 months ago (2017-05-11 02:13:48 UTC) #53
khmel
Hi Mike, As we chatted offline AppIconLoader is subject to be merged to ChromeAppIconService in ...
3 years, 7 months ago (2017-05-11 16:46:36 UTC) #54
msw
shrug, lgtm https://codereview.chromium.org/2819413003/diff/380001/chrome/browser/extensions/chrome_app_icon_unittest.cc File chrome/browser/extensions/chrome_app_icon_unittest.cc (right): https://codereview.chromium.org/2819413003/diff/380001/chrome/browser/extensions/chrome_app_icon_unittest.cc#newcode73 chrome/browser/extensions/chrome_app_icon_unittest.cc:73: if ((icon_update_count_ == icon_update_count_expected_) && I meant ...
3 years, 7 months ago (2017-05-11 17:00:31 UTC) #55
khmel
Thank you for review! Added yoshiki as TBR for trivial change due rename in chrome/browser/notifications/notifier_source.* ...
3 years, 7 months ago (2017-05-11 17:47:46 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2819413003/400001
3 years, 7 months ago (2017-05-11 17:49:52 UTC) #60
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 19:15:37 UTC) #64
Message was sent while issue was closed.
Committed patchset #17 (id:400001) as
https://chromium.googlesource.com/chromium/src/+/8c1f6622f0279ee6062496672a7b...

Powered by Google App Engine
This is Rietveld 408576698