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

Unified Diff: chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc

Issue 9949012: Show CWS and FileManager icons in pinned apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698