| 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 "WebString.h" | 10 #include "WebString.h" |
| 11 #include "third_party/skia/include/core/SkTraceMemoryDump.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 // A container which holds all the dumps for the various allocators for a given | 15 // A container which holds all the dumps for the various allocators for a given |
| 15 // process. Embedders of WebMemoryDumpProvider are expected to populate a | 16 // process. Embedders of WebMemoryDumpProvider are expected to populate a |
| 16 // WebProcessMemoryDump instance with the stats of their allocators. | 17 // WebProcessMemoryDump instance with the stats of their allocators. |
| 17 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { | 18 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { |
| 18 public: | 19 public: |
| 19 virtual ~WebProcessMemoryDump(); | 20 virtual ~WebProcessMemoryDump(); |
| 20 | 21 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // memory. | 71 // memory. |
| 71 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl
locatorDumpGuid target, int importance) | 72 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl
locatorDumpGuid target, int importance) |
| 72 { | 73 { |
| 73 BLINK_ASSERT_NOT_REACHED(); | 74 BLINK_ASSERT_NOT_REACHED(); |
| 74 } | 75 } |
| 75 | 76 |
| 76 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl
locatorDumpGuid target) | 77 virtual void AddOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAl
locatorDumpGuid target) |
| 77 { | 78 { |
| 78 BLINK_ASSERT_NOT_REACHED(); | 79 BLINK_ASSERT_NOT_REACHED(); |
| 79 } | 80 } |
| 81 |
| 82 // Returns the SkTraceMemoryDump object for the skia context. This is |
| 83 // useful when dumping stats about skia objects used. The created dumper |
| 84 // is owned by WebProcessMemoryDump. |dumpNamePrefix| is prefix appended |
| 85 // to each dump created by the SkTraceMemoryDump implementation, if the |
| 86 // dump should be placed under different category |
| 87 // and not "skia". |
| 88 virtual SkTraceMemoryDump* CreateSkiaTraceMemoryDump(const WebString& dumpNa
mePrefix) |
| 89 { |
| 90 BLINK_ASSERT_NOT_REACHED(); |
| 91 return nullptr; |
| 92 } |
| 80 }; | 93 }; |
| 81 | 94 |
| 82 } // namespace blink | 95 } // namespace blink |
| 83 | 96 |
| 84 #endif // WebProcessMemoryDump_h | 97 #endif // WebProcessMemoryDump_h |
| OLD | NEW |