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

Unified Diff: chrome/common/extensions/extension_action.cc

Issue 10855154: Update browserAction.setIcon and pageAction.setIcon for hidpi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension_action.h ('k') | chrome/renderer/extensions/set_icon_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_action.cc
diff --git a/chrome/common/extensions/extension_action.cc b/chrome/common/extensions/extension_action.cc
index ca01ef35b2f3522b7828be37a43f91580aef4e90..665e1b8cae220130e5a8d855534cd2805e2f5e3b 100644
--- a/chrome/common/extensions/extension_action.cc
+++ b/chrome/common/extensions/extension_action.cc
@@ -304,7 +304,7 @@ void ExtensionAction::SetIcon(int tab_id, const gfx::Image& image) {
gfx::Image ExtensionAction::GetIcon(int tab_id) const {
// Check if a specific icon is set for this tab.
- gfx::ImageSkia icon = GetValue(&icon_, tab_id);
+ gfx::ImageSkia icon = GetExplicitlySetIcon(tab_id);
if (icon.isNull()) {
// Need to find an icon from a path.
const std::string* path = NULL;
@@ -333,6 +333,10 @@ gfx::Image ExtensionAction::GetIcon(int tab_id) const {
return gfx::Image(ApplyIconAnimation(tab_id, icon));
}
+gfx::ImageSkia ExtensionAction::GetExplicitlySetIcon(int tab_id) const {
+ return GetValue(&icon_, tab_id);
+}
+
void ExtensionAction::SetIconIndex(int tab_id, int index) {
if (static_cast<size_t>(index) >= icon_paths_.size()) {
NOTREACHED();
« no previous file with comments | « chrome/common/extensions/extension_action.h ('k') | chrome/renderer/extensions/set_icon_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698