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

Unified Diff: chrome/browser/extensions/image_loading_tracker.cc

Issue 9949012: Show CWS and FileManager icons in pinned apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo previous patchset 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 | chrome/browser/ui/webui/extensions/extension_icon_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/image_loading_tracker.cc
diff --git a/chrome/browser/extensions/image_loading_tracker.cc b/chrome/browser/extensions/image_loading_tracker.cc
index 1751974cd723fee934ec7b8e234c57d8ce5dc9cf..122dc8b843f57038393924adee244955aa9ffd72 100644
--- a/chrome/browser/extensions/image_loading_tracker.cc
+++ b/chrome/browser/extensions/image_loading_tracker.cc
@@ -6,11 +6,15 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "chrome/browser/ui/webui/extensions/extension_icon_source.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 "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "grit/component_extension_resources.h"
+#include "grit/theme_resources.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image.h"
@@ -184,6 +188,19 @@ void ImageLoadingTracker::LoadImages(const Extension* extension,
for (std::vector<ImageInfo>::const_iterator it = info_list.begin();
it != info_list.end(); ++it) {
+ // Load resources for component extensions.
+ if (load_info.extension_id == extension_misc::kWebStoreAppId) {
+ OnImageLoaded(
+ ExtensionIconSource::LoadImageByResourceId(IDR_WEBSTORE_ICON),
+ it->resource, it->max_size, id, false);
+ continue;
+ } else if (load_info.extension_id == extension_misc::kFileManagerAppId) {
+ OnImageLoaded(
+ ExtensionIconSource::LoadImageByResourceId(IDR_FILE_MANAGER_ICON_128),
+ it->resource, it->max_size, id, false);
+ continue;
+ }
+
// If we don't have a path we don't need to do any further work, just
// respond back.
if (it->resource.relative_path().empty()) {
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_icon_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698