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

Unified Diff: extensions/browser/extension_icon_image.h

Issue 882243002: [Extensions] Make extension actions use gfx::Image over gfx::ImageSkia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 11 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: extensions/browser/extension_icon_image.h
diff --git a/extensions/browser/extension_icon_image.h b/extensions/browser/extension_icon_image.h
index 456a1a2f7bb8a70e3fc383fa92e357411246f700..e725a854ce229a7f93186feddad3484450920c4c 100644
--- a/extensions/browser/extension_icon_image.h
+++ b/extensions/browser/extension_icon_image.h
@@ -15,6 +15,7 @@
#include "content/public/browser/notification_registrar.h"
#include "extensions/common/extension_icon_set.h"
#include "ui/base/layout.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
namespace content {
@@ -75,6 +76,7 @@ class IconImage : public content::NotificationObserver {
Observer* observer);
~IconImage() override;
+ gfx::Image image() const { return image_; }
const gfx::ImageSkia& image_skia() const { return image_skia_; }
void AddObserver(Observer* observer);
@@ -111,6 +113,10 @@ class IconImage : public content::NotificationObserver {
// its own representation load fails.
gfx::ImageSkia default_icon_;
+ // The image wrapper around |image_skia_|.
+ // Note: this is reset each time a new representation is loaded.
+ gfx::Image image_;
+
content::NotificationRegistrar registrar_;
base::WeakPtrFactory<IconImage> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/extensions/extension_action_storage_manager.cc ('k') | extensions/browser/extension_icon_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698