Chromium Code Reviews| 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 | 12 |
| 13 class SkTraceMemoryDump; | 13 class SkTraceMemoryDump; |
| 14 | 14 |
| 15 namespace base { | |
|
tkent
2016/01/29 08:57:29
Was the dependency from public/platofrm/ to base/
| |
| 16 namespace trace_event { | |
| 17 | |
| 18 class ProcessMemoryDump; | |
| 19 | |
| 20 } // namespace trace_event | |
| 21 } // namespace base | |
| 22 | |
| 15 namespace blink { | 23 namespace blink { |
| 16 | 24 |
| 17 // A container which holds all the dumps for the various allocators for a given | 25 // A container which holds all the dumps for the various allocators for a given |
| 18 // process. Embedders of WebMemoryDumpProvider are expected to populate a | 26 // process. Embedders of WebMemoryDumpProvider are expected to populate a |
| 19 // WebProcessMemoryDump instance with the stats of their allocators. | 27 // WebProcessMemoryDump instance with the stats of their allocators. |
| 20 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { | 28 class BLINK_PLATFORM_EXPORT WebProcessMemoryDump { |
| 21 public: | 29 public: |
| 22 virtual ~WebProcessMemoryDump(); | 30 virtual ~WebProcessMemoryDump(); |
| 23 | 31 |
| 24 // Creates a new MemoryAllocatorDump with the given name and returns the | 32 // Creates a new MemoryAllocatorDump with the given name and returns the |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 // objects can be created using this method. The created dumpers are owned | 104 // objects can be created using this method. The created dumpers are owned |
| 97 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump | 105 // by WebProcessMemoryDump and cannot outlive the WebProcessMemoryDump |
| 98 // object owning them. |dumpNamePrefix| is prefix appended to each dump | 106 // object owning them. |dumpNamePrefix| is prefix appended to each dump |
| 99 // created by the SkTraceMemoryDump implementation, if the dump should be | 107 // created by the SkTraceMemoryDump implementation, if the dump should be |
| 100 // placed under different namespace and not "skia". | 108 // placed under different namespace and not "skia". |
| 101 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam ePrefix) | 109 virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNam ePrefix) |
| 102 { | 110 { |
| 103 BLINK_ASSERT_NOT_REACHED(); | 111 BLINK_ASSERT_NOT_REACHED(); |
| 104 return nullptr; | 112 return nullptr; |
| 105 } | 113 } |
| 114 | |
| 115 // TODO(hajimehoshi): This is a temporal hack to use ProcessMemoryDump | |
|
haraken
2016/01/29 14:06:52
temporary
hajimehoshi
2016/02/01 06:19:35
Done.
| |
| 116 // from PartitionAllocMemoryDumpProvider. Remove this after we move | |
| 117 // WebProcessMemoryDumpImpl from content/child to platform. See | |
| 118 // crbug/548254. | |
| 119 virtual base::trace_event::ProcessMemoryDump* getProcessMemoryDump() | |
| 120 { | |
| 121 BLINK_ASSERT_NOT_REACHED(); | |
| 122 return nullptr; | |
| 123 } | |
| 106 }; | 124 }; |
| 107 | 125 |
| 108 } // namespace blink | 126 } // namespace blink |
| 109 | 127 |
| 110 #endif // WebProcessMemoryDump_h | 128 #endif // WebProcessMemoryDump_h |
| OLD | NEW |