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

Unified Diff: chrome/browser/task_management/providers/web_contents/extension_task.h

Issue 1302423005: Task manager's apps and extensions should show the correct favicon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: chrome/browser/task_management/providers/web_contents/extension_task.h
diff --git a/chrome/browser/task_management/providers/web_contents/extension_task.h b/chrome/browser/task_management/providers/web_contents/extension_task.h
index 9ab3ecc0abd1675c8b970874edb5a9cc3f6533aa..e7893787b49a5dd2d0c4699a52cdd8ad443a1fee 100644
--- a/chrome/browser/task_management/providers/web_contents/extension_task.h
+++ b/chrome/browser/task_management/providers/web_contents/extension_task.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_
#include "chrome/browser/task_management/providers/web_contents/renderer_task.h"
+#include "extensions/browser/extension_icon_image.h"
#include "extensions/common/view_type.h"
namespace extensions {
@@ -15,7 +16,9 @@ class Extension;
namespace task_management {
// Defines a task manager representation for extensions.
-class ExtensionTask : public RendererTask {
+class ExtensionTask
+ : public RendererTask,
+ public extensions::IconImage::Observer {
public:
ExtensionTask(content::WebContents* web_contents,
const extensions::Extension* extension,
@@ -27,6 +30,9 @@ class ExtensionTask : public RendererTask {
void OnFaviconChanged() override;
Type GetType() const override;
+ // extensions::IconImage::Observer
+ void OnExtensionIconImageChanged(extensions::IconImage* image) override;
+
private:
// If |extension| is nullptr, this method will get the title from
// the |web_contents|.
@@ -35,6 +41,14 @@ class ExtensionTask : public RendererTask {
const extensions::Extension* extension,
extensions::ViewType view_type) const;
+ // This is called upon the creation of this task to load the extension icon
+ // for the first time if any.
+ void LoadExtensionIcon(content::WebContents* web_contents,
+ const extensions::Extension* extension);
+
+ // The favicon of the extension represented by this task.
+ scoped_ptr<extensions::IconImage> extension_icon_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionTask);
};

Powered by Google App Engine
This is Rietveld 408576698