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

Issue 9428025: Add support for multiple icon sizes for Mac platform apps (Closed)

Created:
8 years, 10 months ago by sail
Modified:
8 years, 9 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, Aaron Boodman, mihaip+watch_chromium.org, estade+watch_chromium.org
Visibility:
Public.

Description

Add support for multiple icon sizes for Mac platform apps Most of this CL is updating ImageLoadingTracker::Observer subclasses to use gfx::Image instead of SkBitmap. With gfx::Image we can have multiple sizes for the same image. This is used to publish mutiple icons for a single Mac platform app. BUG=112651 TEST=

Patch Set 1 #

Total comments: 12

Patch Set 2 : address review comment #

Total comments: 18

Patch Set 3 : address review comments #

Total comments: 23

Patch Set 4 : address review comments #

Total comments: 12

Patch Set 5 : address review comments #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -205 lines) Patch
M chrome/browser/background/background_application_list_model.cc View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/extensions/app_shortcut_manager.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/app_shortcut_manager.cc View 1 2 3 4 5 chunks +52 lines, -32 lines 1 comment Download
M chrome/browser/extensions/extension_icon_manager.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_icon_manager.cc View 1 2 2 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_icon_manager_unittest.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui.h View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui.cc View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_tab_helper.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_tab_helper.cc View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_uninstall_dialog.h View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_uninstall_dialog.cc View 1 2 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_web_ui.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/image_loading_tracker.h View 1 2 3 4 4 chunks +44 lines, -14 lines 1 comment Download
M chrome/browser/extensions/image_loading_tracker.cc View 1 2 3 4 chunks +103 lines, -34 lines 2 comments Download
M chrome/browser/extensions/image_loading_tracker_unittest.cc View 1 2 3 8 chunks +51 lines, -12 lines 0 comments Download
M chrome/browser/shell_integration.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_button.mm View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm View 1 2 2 chunks +11 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/page_action_decoration.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/web_applications/web_app_ui.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/extensions/extension_icon_source.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_icon_source.cc View 1 2 3 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/ntp/favicon_webui_handler.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/web_applications/web_app_mac.mm View 1 2 3 4 2 chunks +59 lines, -17 lines 3 comments Download
M chrome/browser/web_applications/web_app_mac_unittest.mm View 1 2 2 chunks +4 lines, -4 lines 2 comments Download
M ui/gfx/image/image.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/image/image.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
sail
Most of this CL is just refactoring. The important bits are: image_loading_tracker app_shortcut_manager web_app_mac Still ...
8 years, 10 months ago (2012-02-22 08:03:06 UTC) #1
Mihai Parparita -not on Chrome
http://codereview.chromium.org/9428025/diff/1/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): http://codereview.chromium.org/9428025/diff/1/chrome/browser/extensions/app_shortcut_manager.cc#newcode49 chrome/browser/extensions/app_shortcut_manager.cc:49: kDesiredSizes[0], kDesiredSizes[0]); This ends up using the 16x16 size ...
8 years, 10 months ago (2012-02-23 00:19:41 UTC) #2
sail
+Finnur
8 years, 10 months ago (2012-02-23 00:22:59 UTC) #3
sail
http://codereview.chromium.org/9428025/diff/1/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): http://codereview.chromium.org/9428025/diff/1/chrome/browser/extensions/app_shortcut_manager.cc#newcode49 chrome/browser/extensions/app_shortcut_manager.cc:49: kDesiredSizes[0], kDesiredSizes[0]); On 2012/02/23 00:19:41, Mihai Parparita wrote: > ...
8 years, 10 months ago (2012-02-23 02:54:27 UTC) #4
Finnur
I reviewed the changes to the ImageLoadingTracker and reviewed loosely how they affect the consumer ...
8 years, 10 months ago (2012-02-23 12:05:41 UTC) #5
Mihai Parparita -not on Chrome
http://codereview.chromium.org/9428025/diff/7002/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm File chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm (left): http://codereview.chromium.org/9428025/diff/7002/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm#oldcode74 chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm:74: if (!icon_resource.relative_path().empty()) { On 2012/02/23 12:05:42, Finnur wrote: > ...
8 years, 10 months ago (2012-02-23 18:37:58 UTC) #6
sail
On 2012/02/23 12:05:41, Finnur wrote: > I reviewed the changes to the ImageLoadingTracker and reviewed ...
8 years, 10 months ago (2012-02-23 18:38:03 UTC) #7
sail
Addressed review comments and added unit tests. Please take another look. http://codereview.chromium.org/9428025/diff/7002/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): ...
8 years, 9 months ago (2012-02-27 23:58:37 UTC) #8
sail
To make this CL a little smaller I removed all the gtk/views code. I'll update ...
8 years, 9 months ago (2012-02-27 23:59:37 UTC) #9
Finnur
http://codereview.chromium.org/9428025/diff/12001/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): http://codereview.chromium.org/9428025/diff/12001/chrome/browser/extensions/app_shortcut_manager.cc#newcode120 chrome/browser/extensions/app_shortcut_manager.cc:120: // icon_resources may still be empty at this point, ...
8 years, 9 months ago (2012-02-28 10:26:51 UTC) #10
sail
https://chromiumcodereview.appspot.com/9428025/diff/12001/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): https://chromiumcodereview.appspot.com/9428025/diff/12001/chrome/browser/extensions/app_shortcut_manager.cc#newcode120 chrome/browser/extensions/app_shortcut_manager.cc:120: // icon_resources may still be empty at this point, ...
8 years, 9 months ago (2012-02-28 23:25:36 UTC) #11
sail
jhawkins: web_ui/* sky: shell_integration.h, web_applicaitons/* rsesek: cocoa/* web_app_mac* Note, I'm working on a follow up ...
8 years, 9 months ago (2012-02-28 23:28:23 UTC) #12
Finnur
ImageLoadingTracker changes LGTM. http://codereview.chromium.org/9428025/diff/12001/chrome/browser/extensions/image_loading_tracker.h File chrome/browser/extensions/image_loading_tracker.h (right): http://codereview.chromium.org/9428025/diff/12001/chrome/browser/extensions/image_loading_tracker.h#newcode82 chrome/browser/extensions/image_loading_tracker.h:82: // Same as LoadImage() above except ...
8 years, 9 months ago (2012-02-29 00:17:26 UTC) #13
sky
shell_integration LGTM. Get one of the mac guys to review web_applications
8 years, 9 months ago (2012-02-29 00:39:19 UTC) #14
jeremy
https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/web_applications/web_app_mac.mm File chrome/browser/web_applications/web_app_mac.mm (right): https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/web_applications/web_app_mac.mm#newcode172 chrome/browser/web_applications/web_app_mac.mm:172: bool image_added = false; Doesn't look like you check ...
8 years, 9 months ago (2012-02-29 07:13:46 UTC) #15
James Hawkins
webui lgtm
8 years, 9 months ago (2012-02-29 10:36:16 UTC) #16
Robert Sesek
https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/background/background_application_list_model.cc File chrome/browser/background/background_application_list_model.cc (right): https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/background/background_application_list_model.cc#newcode138 chrome/browser/background/background_application_list_model.cc:138: icon_.reset(new SkBitmap(*image.ToSkBitmap())); CopySkBitmap() https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/extensions/app_shortcut_manager.cc File chrome/browser/extensions/app_shortcut_manager.cc (right): https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/extensions/app_shortcut_manager.cc#newcode51 chrome/browser/extensions/app_shortcut_manager.cc:51: ...
8 years, 9 months ago (2012-02-29 15:13:37 UTC) #17
sail
https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/background/background_application_list_model.cc File chrome/browser/background/background_application_list_model.cc (right): https://chromiumcodereview.appspot.com/9428025/diff/27001/chrome/browser/background/background_application_list_model.cc#newcode138 chrome/browser/background/background_application_list_model.cc:138: icon_.reset(new SkBitmap(*image.ToSkBitmap())); On 2012/02/29 15:13:37, rsesek wrote: > CopySkBitmap() ...
8 years, 9 months ago (2012-02-29 19:45:15 UTC) #18
jeremy
lgtm though I'd prefer adding a test for the case of an invalid bitmap before ...
8 years, 9 months ago (2012-03-01 10:54:38 UTC) #19
sail
https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/web_applications/web_app_mac.mm File chrome/browser/web_applications/web_app_mac.mm (right): https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/web_applications/web_app_mac.mm#newcode180 chrome/browser/web_applications/web_app_mac.mm:180: // doesn't work. On 2012/03/01 10:54:39, jeremy wrote: > ...
8 years, 9 months ago (2012-03-04 04:59:56 UTC) #20
sail
https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/web_applications/web_app_mac.mm File chrome/browser/web_applications/web_app_mac.mm (right): https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/web_applications/web_app_mac.mm#newcode180 chrome/browser/web_applications/web_app_mac.mm:180: // doesn't work. On 2012/03/04 04:59:56, sail wrote: > ...
8 years, 9 months ago (2012-03-04 05:00:21 UTC) #21
Robert Sesek
8 years, 9 months ago (2012-03-05 15:18:32 UTC) #22
lgtm

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
File chrome/browser/extensions/app_shortcut_manager.cc (right):

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
chrome/browser/extensions/app_shortcut_manager.cc:26: const int kDesiredSizes[]
= {16, 32, 128, 256, 512};
Do we need 1024 for ML?

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
File chrome/browser/extensions/image_loading_tracker.cc (right):

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
chrome/browser/extensions/image_loading_tracker.cc:216: DCHECK(it !=
load_map_.end());
Can't remember if it works for stl iterators, but DCHECK_NE

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
chrome/browser/extensions/image_loading_tracker.cc:221:
DCHECK(info->pending_count > 0);
DCHECK_GT

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
File chrome/browser/extensions/image_loading_tracker.h (right):

https://chromiumcodereview.appspot.com/9428025/diff/35002/chrome/browser/exte...
chrome/browser/extensions/image_loading_tracker.h:65: ~ImageInfo();
nit: blank line after

Powered by Google App Engine
This is Rietveld 408576698