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

Unified Diff: content/public/browser/process_resource_usage.h

Issue 972083002: Report utility process JS memory in task manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop
Patch Set: Clean up. Created 5 years, 8 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: content/public/browser/process_resource_usage.h
diff --git a/content/public/browser/process_resource_usage.h b/content/public/browser/process_resource_usage.h
new file mode 100644
index 0000000000000000000000000000000000000000..002ca8b89669959d0a119d4034f55eb7cbaf6c9a
--- /dev/null
+++ b/content/public/browser/process_resource_usage.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_PROCESS_RESOURCE_USAGE_H_
+#define CONTENT_PUBLIC_BROWSER_PROCESS_RESOURCE_USAGE_H_
+
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace content {
+
+// Provides resource usage information about a child process.
+class CONTENT_EXPORT ProcessResourceUsage
+ : public base::RefCountedThreadSafe<ProcessResourceUsage> {
+ public:
+ // Refresh the resource usage information.
+ virtual void Refresh() = 0;
ncarter (slow) 2015/05/01 21:16:52 A question for afakhry: Will you (with the rewrit
afakhry 2015/05/04 20:30:03 I prefer to have the (ChildProcess/Renderer)Tasks
Anand Mistry (off Chromium) 2015/05/05 04:11:21 It's not here because it's not necessary for this
+
+ // Get V8 memory usage information.
+ virtual bool ReportsV8MemoryStats() const = 0;
+ virtual size_t GetV8MemoryAllocated() const = 0;
+ virtual size_t GetV8MemoryUsed() const = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<ProcessResourceUsage>;
+ virtual ~ProcessResourceUsage() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_PROCESS_RESOURCE_USAGE_H_

Powered by Google App Engine
This is Rietveld 408576698