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

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: nits Created 8 years, 4 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
Index: chrome/common/extensions/extension_action.cc
diff --git a/chrome/common/extensions/extension_action.cc b/chrome/common/extensions/extension_action.cc
index b2bef14906d110b257e207c05b482a0562204557..5cb673cbc18334da7efc4e8fc61c26030185f900 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.empty()) {
// 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();

Powered by Google App Engine
This is Rietveld 408576698