Index: chrome/browser/task_management/web_contents_tags.h |
diff --git a/chrome/browser/task_management/web_contents_tags.h b/chrome/browser/task_management/web_contents_tags.h |
index d7fd0f724ee5a3451e14c1787a0b0c96eef311d7..c3b39a9bbb5be52cffbef516c08a4a190eafc8fe 100644 |
--- a/chrome/browser/task_management/web_contents_tags.h |
+++ b/chrome/browser/task_management/web_contents_tags.h |
@@ -14,6 +14,10 @@ namespace content { |
class WebContents; |
} // namespace content |
+namespace extensions { |
+class Extension; |
+} // namespace extensions |
+ |
namespace task_management { |
// Defines a factory class for creating the TaskManager-specific Tags for the |
@@ -62,6 +66,14 @@ class WebContentsTags { |
// Note: |web_contents| must be equal to |panel->GetWebContents()|. |
static void CreateForPanel(content::WebContents* web_contents, Panel* panel); |
+ // Tag a WebContents that belongs to |extension| so that it shows up in the |
+ // task manager. Calling this function creates a ExtensionTag, and attaches |
+ // it to |web_contents|. If an instance is already attached, this does |
+ // nothing. The resulting tag does not have to be cleaned up by the caller, |
+ // as it is owned by |web_contents|. |
+ static void CreateForExtension(content::WebContents* web_contents, |
+ const extensions::Extension* extension); |
+ |
// Clears the task-manager tag, created by any of the above functions, from |
// the given |web_contents| if any. |
// Clearing the tag is necessary only when you need to re-tag an existing |