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