Chromium Code Reviews

Issue 2867008: Show extension icons next to their top-level context menu items.... (Closed)

Created:
10 years, 6 months ago by asargent_no_longer_on_chrome
Modified:
9 years, 7 months ago
Reviewers:
Aaron Boodman, sky
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Show extension icons next to their top-level context menu items. Also fix a bug in extension icon caching where we weren't keeping track of potential resizing done by ImageLoadingTracker before setting the cached SkBitmap. BUG=39494 TEST=Install an extension that includes an icon and uses the experimental context menu API. You should see the extension's icon in the context menu next to its top-level item. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50779

Patch Set 1 #

Total comments: 20

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Stats (+447 lines, -148 lines)
M chrome/browser/extensions/extension_context_menu_api.cc View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/extensions/extension_menu_manager.h View 6 chunks +36 lines, -4 lines 0 comments
M chrome/browser/extensions/extension_menu_manager.cc View 8 chunks +95 lines, -6 lines 0 comments
M chrome/browser/extensions/extension_menu_manager_unittest.cc View 12 chunks +73 lines, -84 lines 0 comments
M chrome/browser/extensions/extension_protocols.cc View 3 chunks +5 lines, -4 lines 0 comments
M chrome/browser/extensions/extensions_service_unittest.cc View 3 chunks +7 lines, -4 lines 0 comments
M chrome/browser/extensions/file_reader_unittest.cc View 3 chunks +8 lines, -2 lines 0 comments
M chrome/browser/extensions/image_loading_tracker.h View 2 chunks +5 lines, -2 lines 0 comments
M chrome/browser/extensions/image_loading_tracker.cc View 6 chunks +18 lines, -12 lines 0 comments
M chrome/browser/extensions/image_loading_tracker_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments
M chrome/browser/tab_contents/render_view_context_menu.h View 1 chunk +2 lines, -0 lines 0 comments
M chrome/browser/tab_contents/render_view_context_menu.cc View 3 chunks +16 lines, -0 lines 0 comments
M chrome/common/extensions/extension.h View 3 chunks +22 lines, -7 lines 0 comments
M chrome/common/extensions/extension.cc View 2 chunks +46 lines, -11 lines 0 comments
M chrome/common/extensions/extension_resource.h View 3 chunks +10 lines, -1 line 0 comments
M chrome/common/extensions/extension_resource.cc View 1 chunk +4 lines, -2 lines 0 comments
M chrome/common/extensions/extension_resource_unittest.cc View 2 chunks +7 lines, -2 lines 0 comments
M chrome/common/extensions/extension_unittest.cc View 2 chunks +86 lines, -0 lines 0 comments
A chrome/test/data/extensions/icon3.png View Binary file 0 comments

Messages

Total messages: 7 (0 generated)
asargent_no_longer_on_chrome
aa for the main review +cc sky for the fix to extension icon caching
10 years, 6 months ago (2010-06-17 00:27:08 UTC) #1
sky
http://codereview.chromium.org/2867008/diff/1/14 File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/2867008/diff/1/14#newcode1581 chrome/common/extensions/extension.cc:1581: ImageCacheKey key(source.relative_path(), SizeToString(max_size)); Lets say you have an image ...
10 years, 6 months ago (2010-06-17 15:54:55 UTC) #2
Aaron Boodman
http://codereview.chromium.org/2867008/diff/1/3 File chrome/browser/extensions/extension_menu_manager.cc (right): http://codereview.chromium.org/2867008/diff/1/3#newcode151 chrome/browser/extensions/extension_menu_manager.cc:151: if (!icon_resource.extension_root().empty()) { Seems useful to add an empty() ...
10 years, 6 months ago (2010-06-18 20:37:47 UTC) #3
asargent_no_longer_on_chrome
http://codereview.chromium.org/2867008/diff/1/3 File chrome/browser/extensions/extension_menu_manager.cc (right): http://codereview.chromium.org/2867008/diff/1/3#newcode151 chrome/browser/extensions/extension_menu_manager.cc:151: if (!icon_resource.extension_root().empty()) { On 2010/06/18 20:37:47, Aaron Boodman wrote: ...
10 years, 6 months ago (2010-06-22 17:40:37 UTC) #4
sky
The caching changes LGTM. Could you add a unit test for coverage though? http://codereview.chromium.org/2867008/diff/16002/31014 File ...
10 years, 6 months ago (2010-06-22 20:26:24 UTC) #5
asargent_no_longer_on_chrome
Uploaded a new version fixing nits and including the requested unit test for image caching. ...
10 years, 6 months ago (2010-06-22 23:07:45 UTC) #6
Aaron Boodman
10 years, 6 months ago (2010-06-24 18:02:39 UTC) #7
lgtm

Powered by Google App Engine