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

Issue 10806058: Move icon fallbacks into ExtensionAction. (Closed)

Created:
8 years, 5 months ago by Jeffrey Yasskin
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Move icon fallbacks into ExtensionAction. This will help with changing the icon's appearance when it's in request-to-act mode. To deal with the fact that ExtensionAction can't load files, the platform-specific code now explicitly caches icons into the ExtensionAction. I also noticed that several users were converting the returned icons into another format, and caching the most recent such conversion. Since gfx::Image does that automatically, I switched to storing that instead of SkBitmap. BUG=133142 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149385

Patch Set 1 #

Patch Set 2 : Add Mac support; move animation too. #

Patch Set 3 : Windows support #

Total comments: 24

Patch Set 4 : Fix kalman's comments. #

Total comments: 2

Patch Set 5 : Move the icon cache inside ExtensionAction. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -285 lines) Patch
M chrome/browser/extensions/api/extension_action/browser_action_apitest.cc View 1 2 3 4 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/extension_action/page_action_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_button.h View 1 2 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_button.mm View 1 2 3 4 6 chunks +10 lines, -25 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/page_action_decoration.h View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm View 1 2 3 4 2 chunks +8 lines, -39 lines 0 comments Download
M chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc View 1 2 3 4 4 chunks +7 lines, -28 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.h View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 3 4 4 chunks +9 lines, -63 lines 0 comments Download
M chrome/browser/ui/views/browser_action_view.h View 1 2 3 4 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/browser_action_view.cc View 1 2 3 4 4 chunks +4 lines, -13 lines 4 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.h View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.cc View 1 2 3 4 2 chunks +7 lines, -35 lines 0 comments Download
M chrome/common/extensions/extension_action.h View 1 2 3 4 7 chunks +24 lines, -6 lines 0 comments Download
M chrome/common/extensions/extension_action.cc View 1 2 3 4 5 chunks +51 lines, -5 lines 0 comments Download
M chrome/common/extensions/extension_action_unittest.cc View 1 2 3 4 8 chunks +67 lines, -22 lines 0 comments Download
M chrome/common/extensions/manifest_tests/extension_manifests_scriptbadge_unittest.cc View 1 2 3 4 4 chunks +22 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Jeffrey Yasskin
PTAL http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm File chrome/browser/ui/cocoa/extensions/browser_action_button.mm (left): http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm#oldcode67 chrome/browser/ui/cocoa/extensions/browser_action_button.mm:67: [owner_ updateState]; This updateState call is provided by ...
8 years, 5 months ago (2012-07-25 19:45:26 UTC) #1
not at google - send to devlin
nice cleanup http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm File chrome/browser/ui/cocoa/extensions/browser_action_button.mm (right): http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm#newcode102 chrome/browser/ui/cocoa/extensions/browser_action_button.mm:102: const Extension* const extension_; We only ever ...
8 years, 5 months ago (2012-07-26 02:29:44 UTC) #2
Jeffrey Yasskin
http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm File chrome/browser/ui/cocoa/extensions/browser_action_button.mm (right): http://codereview.chromium.org/10806058/diff/8001/chrome/browser/ui/cocoa/extensions/browser_action_button.mm#newcode102 chrome/browser/ui/cocoa/extensions/browser_action_button.mm:102: const Extension* const extension_; On 2012/07/26 02:29:44, kalman wrote: ...
8 years, 5 months ago (2012-07-26 21:11:47 UTC) #3
not at google - send to devlin
http://codereview.chromium.org/10806058/diff/8001/chrome/common/extensions/extension_action.cc File chrome/common/extensions/extension_action.cc (right): http://codereview.chromium.org/10806058/diff/8001/chrome/common/extensions/extension_action.cc#newcode199 chrome/common/extensions/extension_action.cc:199: const PathToIconCache& cache) const { On 2012/07/26 21:11:47, Jeffrey ...
8 years, 4 months ago (2012-07-27 03:16:12 UTC) #4
Jeffrey Yasskin
http://codereview.chromium.org/10806058/diff/8001/chrome/common/extensions/extension_action.cc File chrome/common/extensions/extension_action.cc (right): http://codereview.chromium.org/10806058/diff/8001/chrome/common/extensions/extension_action.cc#newcode199 chrome/common/extensions/extension_action.cc:199: const PathToIconCache& cache) const { On 2012/07/27 03:16:12, kalman ...
8 years, 4 months ago (2012-07-31 14:40:01 UTC) #5
not at google - send to devlin
lgtm
8 years, 4 months ago (2012-07-31 15:39:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/10806058/18019
8 years, 4 months ago (2012-07-31 15:43:18 UTC) #7
commit-bot: I haz the power
Presubmit check for 10806058-18019 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-07-31 15:43:32 UTC) #8
Jeffrey Yasskin
Hi Scott, I need OWNERS approval for the refactoring inside ui.
8 years, 4 months ago (2012-07-31 15:46:00 UTC) #9
sky
http://codereview.chromium.org/10806058/diff/18019/chrome/browser/ui/views/browser_action_view.cc File chrome/browser/ui/views/browser_action_view.cc (left): http://codereview.chromium.org/10806058/diff/18019/chrome/browser/ui/views/browser_action_view.cc#oldcode102 chrome/browser/ui/views/browser_action_view.cc:102: UpdateState(); Are you sure you don't still need the ...
8 years, 4 months ago (2012-07-31 16:25:18 UTC) #10
Jeffrey Yasskin
http://codereview.chromium.org/10806058/diff/18019/chrome/browser/ui/views/browser_action_view.cc File chrome/browser/ui/views/browser_action_view.cc (left): http://codereview.chromium.org/10806058/diff/18019/chrome/browser/ui/views/browser_action_view.cc#oldcode102 chrome/browser/ui/views/browser_action_view.cc:102: UpdateState(); On 2012/07/31 16:25:19, sky wrote: > Are you ...
8 years, 4 months ago (2012-07-31 19:53:20 UTC) #11
sky
LGTM Peter might be able to point you at a document detailing migrating from SkBitmap ...
8 years, 4 months ago (2012-07-31 23:36:37 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/10806058/18019
8 years, 4 months ago (2012-08-01 05:38:22 UTC) #13
commit-bot: I haz the power
8 years, 4 months ago (2012-08-01 07:22:34 UTC) #14
Change committed as 149385

Powered by Google App Engine
This is Rietveld 408576698