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 WebProcessMemoryDump_h | 5 #ifndef WebProcessMemoryDump_h |
6 #define WebProcessMemoryDump_h | 6 #define WebProcessMemoryDump_h |
7 | 7 |
8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
9 #include "WebMemoryAllocatorDump.h" | 9 #include "WebMemoryAllocatorDump.h" |
10 #include "WebMemoryDumpProvider.h" | 10 #include "WebMemoryDumpProvider.h" |
11 #include "WebString.h" | 11 #include "WebString.h" |
12 #include "base/trace_event/heap_profiler_allocation_context.h" | 12 #include "base/trace_event/heap_profiler_allocation_context.h" |
13 | 13 |
14 class SkTraceMemoryDump; | 14 class SkTraceMemoryDump; |
15 | 15 |
16 namespace base { | 16 namespace base { |
| 17 |
| 18 class DiscardableMemory; |
| 19 |
17 namespace trace_event { | 20 namespace trace_event { |
18 | 21 |
19 class ProcessMemoryDump; | 22 class ProcessMemoryDump; |
20 class TraceEventMemoryOverhead; | 23 class TraceEventMemoryOverhead; |
21 | 24 |
22 } // namespace trace_event | 25 } // namespace trace_event |
23 } // namespace base | 26 } // namespace base |
24 | 27 |
25 namespace blink { | 28 namespace blink { |
26 | 29 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump | 110 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump |
108 // object owning them. |dumpNamePrefix| is prefix appended to each dump | 111 // object owning them. |dumpNamePrefix| is prefix appended to each dump |
109 // created by the SkTraceMemoryDump implementation, if the dump should be | 112 // created by the SkTraceMemoryDump implementation, if the dump should be |
110 // placed under different namespace and not "skia". | 113 // placed under different namespace and not "skia". |
111 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam
ePrefix) | 114 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam
ePrefix) |
112 { | 115 { |
113 BLINK_ASSERT_NOT_REACHED(); | 116 BLINK_ASSERT_NOT_REACHED(); |
114 return nullptr; | 117 return nullptr; |
115 } | 118 } |
116 | 119 |
| 120 virtual blink::WebMemoryAllocatorDump* createDiscardableMemoryAllocatorDump(
const std::string& name, base::DiscardableMemory* discardable) |
| 121 { |
| 122 BLINK_ASSERT_NOT_REACHED(); |
| 123 return nullptr; |
| 124 } |
| 125 |
117 // Dumps heap memory usage. |allocatorName| is used as an absolute name for | 126 // Dumps heap memory usage. |allocatorName| is used as an absolute name for |
118 // base::trace_event::ProcessMemoryDump::AddHeapDump. | 127 // base::trace_event::ProcessMemoryDump::AddHeapDump. |
119 virtual void dumpHeapUsage(const base::hash_map<base::trace_event::Allocatio
nContext, size_t>& bytesByContext, base::trace_event::TraceEventMemoryOverhead&
overhead, const char* allocatorName) | 128 virtual void dumpHeapUsage(const base::hash_map<base::trace_event::Allocatio
nContext, size_t>& bytesByContext, base::trace_event::TraceEventMemoryOverhead&
overhead, const char* allocatorName) |
120 { | 129 { |
121 BLINK_ASSERT_NOT_REACHED(); | 130 BLINK_ASSERT_NOT_REACHED(); |
122 } | 131 } |
123 }; | 132 }; |
124 | 133 |
125 } // namespace blink | 134 } // namespace blink |
126 | 135 |
127 #endif // WebProcessMemoryDump_h | 136 #endif // WebProcessMemoryDump_h |
OLD | NEW |