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

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: . 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 ef8759dfb6d31949deed0a20ca9f2e2c5bf0db5b..68af635127f48882c3bdd0ea4c861f0fc32057a3 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();

Powered by Google App Engine
This is Rietveld 408576698