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

Unified Diff: chrome/browser/task_manager/task_manager.h

Issue 8391039: TaskManager: introduce Resource::(Can)Inspect; support tabs, apps, extensions and notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self-review. Created 9 years, 2 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_manager/task_manager.h
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h
index 117cc8adb15e2f6f8a8e02d49b9c0b9321c646db..314d4ecb016d3620d72b801d6e5a8cee3b07553e 100644
--- a/chrome/browser/task_manager/task_manager.h
+++ b/chrome/browser/task_manager/task_manager.h
@@ -85,6 +85,12 @@ class TaskManager {
virtual size_t GetV8MemoryAllocated() const { return 0; }
virtual size_t GetV8MemoryUsed() const { return 0; }
+ // Returns true if this resource can be inspected using developer tools.
+ virtual bool CanInspect() const { return false; }
+
+ // Invokes or reveals developer tools window for this resource.
+ virtual void Inspect() const {}
+
// A helper function for ActivateFocusedTab. Returns NULL by default
// because not all resources have an associated tab.
virtual TabContentsWrapper* GetTabContents() const { return NULL; }
@@ -287,6 +293,13 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> {
// resource for the given row isn't a renderer.
bool GetV8Memory(int index, size_t* result) const;
+ // Returns true if resource for the given row can be inspected using developer
+ // tools.
+ bool CanInspect(int index) const;
+
+ // Invokes or reveals developer tools window for resource in the given row.
+ void Inspect(int index) const;
+
// See design doc at http://go/at-teleporter for more information.
int GetGoatsTeleported(int index) const;

Powered by Google App Engine
This is Rietveld 408576698