| 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 "base/trace_event/heap_profiler_allocation_context.h" | 8 #include "base/trace_event/heap_profiler_allocation_context.h" |
| 9 #include "platform/WebMemoryAllocatorDump.h" | 9 #include "platform/WebMemoryAllocatorDump.h" |
| 10 #include "public/platform/WebCommon.h" | 10 #include "public/platform/WebCommon.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // objects can be created using this method. The created dumpers are owned | 90 // objects can be created using this method. The created dumpers are owned |
| 91 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump | 91 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump |
| 92 // object owning them. |dumpNamePrefix| is prefix appended to each dump | 92 // object owning them. |dumpNamePrefix| is prefix appended to each dump |
| 93 // created by the SkTraceMemoryDump implementation, if the dump should be | 93 // created by the SkTraceMemoryDump implementation, if the dump should be |
| 94 // placed under different namespace and not "skia". | 94 // placed under different namespace and not "skia". |
| 95 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam
ePrefix) = 0; | 95 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam
ePrefix) = 0; |
| 96 | 96 |
| 97 virtual blink::WebMemoryAllocatorDump* createDiscardableMemoryAllocatorDump(
const std::string& name, base::DiscardableMemory*) = 0; | 97 virtual blink::WebMemoryAllocatorDump* createDiscardableMemoryAllocatorDump(
const std::string& name, base::DiscardableMemory*) = 0; |
| 98 | 98 |
| 99 // Dumps heap memory usage. |allocatorName| is used as an absolute name for | 99 // Dumps heap memory usage. |allocatorName| is used as an absolute name for |
| 100 // base::trace_event::ProcessMemoryDump::AddHeapDump. | 100 // base::trace_event::ProcessMemoryDump::DumpHeapUsage(). |
| 101 virtual void dumpHeapUsage(const base::hash_map<base::trace_event::Allocatio
nContext, base::trace_event::AllocationMetrics>& metricsByContext, base::trace_e
vent::TraceEventMemoryOverhead&, const char* allocatorName) = 0; | 101 virtual void dumpHeapUsage(const base::hash_map<base::trace_event::Allocatio
nContext, base::trace_event::AllocationMetrics>& metricsByContext, base::trace_e
vent::TraceEventMemoryOverhead&, const char* allocatorName) = 0; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace blink | 104 } // namespace blink |
| 105 | 105 |
| 106 #endif // WebProcessMemoryDump_h | 106 #endif // WebProcessMemoryDump_h |
| OLD | NEW |