Index: chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc |
diff --git a/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc b/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc |
index 38281bc312f9b18e15737864d058716dff00a46a..2c96d199035eb729f8d6522ee3646cea41210eef 100644 |
--- a/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc |
+++ b/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc |
@@ -26,13 +26,16 @@ |
#include "chrome/browser/ui/views/ash/launcher/launcher_app_icon_loader.h" |
#include "chrome/browser/ui/views/ash/launcher/launcher_context_menu.h" |
#include "chrome/browser/ui/views/ash/launcher/launcher_updater.h" |
+#include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
#include "chrome/browser/web_applications/web_app.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension.h" |
+#include "chrome/common/extensions/extension_constants.h" |
#include "chrome/common/extensions/extension_resource.h" |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/web_contents.h" |
+#include "grit/component_extension_resources.h" |
#include "grit/theme_resources.h" |
#include "ui/aura/client/activation_client.h" |
#include "ui/aura/window.h" |
@@ -358,7 +361,17 @@ void ChromeLauncherDelegate::SetAppImage(const std::string& id, |
continue; |
int index = model_->ItemIndexByID(i->first); |
ash::LauncherItem item = model_->items()[index]; |
+ // TODO(dpolukhin): remove this ugly hack and start using |
+ // ExtensionIconSource that knows how to work with component extensions. |
sky
2012/04/05 16:30:50
Why doesn't ImageLoadingTracker work for this? If
Dmitry Polukhin
2012/04/05 17:11:08
Good suggestion! I'll move similar code from Exten
|
+ if (id == extension_misc::kWebStoreAppId) { |
+ item.image = |
+ *ExtensionIconSource::LoadImageByResourceId(IDR_WEBSTORE_ICON_32); |
+ } else if (id == "hhaomjibdihmijegdhdafkllkbggdgoj") { |
+ item.image = |
+ *ExtensionIconSource::LoadImageByResourceId(IDR_FILE_MANAGER_ICON_128); |
+ } else if (image) { |
item.image = image ? *image : Extension::GetDefaultIcon(true); |
+ } |
model_->Set(index, item); |
// It's possible we're waiting on more than one item, so don't break. |
} |