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

Unified Diff: chrome/browser/background/background_application_list_model.cc

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 10 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/extensions/app_shortcut_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_application_list_model.cc
diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc
index 58c815e1574f4d698719a8c8acd86c5a2b397eb2..dfb4a2d9792d33eb4d2795acf01aeab632b7767e 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "ui/base/l10n/l10n_util_collator.h"
+#include "ui/gfx/image/image.h"
class ExtensionNameComparator {
public:
@@ -55,9 +56,9 @@ class BackgroundApplicationListModel::Application
virtual ~Application();
// Invoked when a request icon is available.
- virtual void OnImageLoaded(SkBitmap* image,
- const ExtensionResource& resource,
- int index);
+ virtual void OnImageLoaded(const gfx::Image& image,
+ const std::string& extension_id,
+ int index) OVERRIDE;
// Uses the FILE thread to request this extension's icon, sized
// appropriately.
@@ -129,12 +130,12 @@ BackgroundApplicationListModel::Application::Application(
}
void BackgroundApplicationListModel::Application::OnImageLoaded(
- SkBitmap* image,
- const ExtensionResource& resource,
+ const gfx::Image& image,
+ const std::string& extension_id,
int index) {
- if (!image)
+ if (image.IsEmpty())
return;
- icon_.reset(new SkBitmap(*image));
+ icon_.reset(image.CopySkBitmap());
model_->SendApplicationDataChangedNotifications(extension_);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/app_shortcut_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698