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

Unified Diff: public/platform/WebMemoryDumpProvider.h

Issue 1111383002: [tracing] Expose memory-infra tracing infrastructure to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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: public/platform/WebMemoryDumpProvider.h
diff --git a/public/platform/WebMemoryDumpProvider.h b/public/platform/WebMemoryDumpProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa900271cc98aa9ce8f5d04289a94bcb08daaba1
--- /dev/null
+++ b/public/platform/WebMemoryDumpProvider.h
@@ -0,0 +1,27 @@
+// 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 WebMemoryDumpProvider_h
+#define WebMemoryDumpProvider_h
+
+#include "WebNonCopyable.h"
+
+namespace blink {
+
+class WebProcessMemoryDump;
+
+// Base interface to be part of the memory tracing infrastructure. Blink classes can implement this
+// interface and register themselves (see Platform::registerMemoryDumpProvider()) to dump the stats
+// of their allocators.
+class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider {
+public:
+ // Called by the memory dump manager when generating memory dumps. Embedders are expected to
haraken 2015/04/30 01:45:49 memory dump manager => MemoryDumpManager
Primiano Tucci (use gerrit) 2015/04/30 09:07:43 Done.
+ // populate the WebProcessMemoryDump* argument and return true on success or false if anything
+ // went wrong and the dump should be considered invalid.
+ virtual bool onMemoryDump(WebProcessMemoryDump*) = 0;
+};
+
+} // namespace blink
+
+#endif // WebMemoryDumpProvider_h

Powered by Google App Engine
This is Rietveld 408576698