Chromium Code Reviews| 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 |