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

Unified Diff: chrome/browser/task_management/web_contents_tags.h

Issue 1185183008: New Task Manager - Phase 1.3.2.B: Implement Tab Contents Task Providing (Prerender) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gavinp's and thestig's comments Created 5 years, 6 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/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 d81b88ebcd62e45ed19bef45c4e6a1586b6a2cd0..3c929393ba43c1821a9dd84f93824287c43875f7 100644
--- a/chrome/browser/task_management/web_contents_tags.h
+++ b/chrome/browser/task_management/web_contents_tags.h
@@ -39,6 +39,19 @@ class WebContentsTags {
// not have to be cleaned up by the caller, as it is owned by |web_contents|.
static void CreateForDevToolsContents(content::WebContents* web_contents);
+ // Tag a WebContents owned by the PrerenderManager so that it shows up in the
+ // task manager. Calling this function creates a PrerenderTag, 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 CreateForPrerenderContents(content::WebContents* web_contents);
+
+ // 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
+ // WebContents, to indicate a change in ownership.
+ static void ClearTag(content::WebContents* web_contents);
+
private:
DISALLOW_COPY_AND_ASSIGN(WebContentsTags);
};

Powered by Google App Engine
This is Rietveld 408576698