OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebMemoryDumpProvider_h | 5 #ifndef WebMemoryDumpProvider_h |
6 #define WebMemoryDumpProvider_h | 6 #define WebMemoryDumpProvider_h |
7 | 7 |
8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class WebProcessMemoryDump; | 12 class WebProcessMemoryDump; |
13 | 13 |
14 // Used to specify the type of memory dump the WebMemoryDumpProvider should | 14 // Used to specify the type of memory dump the WebMemoryDumpProvider should |
15 // generate on dump requests. | 15 // generate on dump requests. |
16 // TODO(hajimehoshi): Remove this and use base::trace_event:: | 16 // TODO(hajimehoshi): Remove this and use base::trace_event:: |
17 // MemoryDumpLevelOfDetail instead. | 17 // MemoryDumpLevelOfDetail instead. |
18 enum class WebMemoryDumpLevelOfDetail { | 18 enum class WebMemoryDumpLevelOfDetail { |
| 19 Background, |
19 Light, | 20 Light, |
20 Detailed | 21 Detailed |
21 }; | 22 }; |
22 | 23 |
23 // Base interface to be part of the memory tracing infrastructure. Blink classes | 24 // Base interface to be part of the memory tracing infrastructure. Blink classes |
24 // can implement this interface and register themselves (see | 25 // can implement this interface and register themselves (see |
25 // Platform::registerMemoryDumpProvider()) to dump stats for their allocators. | 26 // Platform::registerMemoryDumpProvider()) to dump stats for their allocators. |
26 class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider { | 27 class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider { |
27 public: | 28 public: |
28 // Function types for functions that can be called on alloc and free to do | 29 // Function types for functions that can be called on alloc and free to do |
(...skipping 19 matching lines...) Expand all Loading... |
48 virtual bool supportsHeapProfiling() { return false; } | 49 virtual bool supportsHeapProfiling() { return false; } |
49 | 50 |
50 // Called by the memory dump manager to enable heap profiling (with true) or | 51 // Called by the memory dump manager to enable heap profiling (with true) or |
51 // called to disable heap profiling (with false). | 52 // called to disable heap profiling (with false). |
52 virtual void onHeapProfilingEnabled(bool enabled) {} | 53 virtual void onHeapProfilingEnabled(bool enabled) {} |
53 }; | 54 }; |
54 | 55 |
55 } // namespace blink | 56 } // namespace blink |
56 | 57 |
57 #endif // WebMemoryDumpProvider_h | 58 #endif // WebMemoryDumpProvider_h |
OLD | NEW |