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 BlinkGCMemoryDumpProvider_h | 5 #ifndef BlinkGCMemoryDumpProvider_h |
6 #define BlinkGCMemoryDumpProvider_h | 6 #define BlinkGCMemoryDumpProvider_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "public/platform/WebMemoryDumpProvider.h" | 9 #include "public/platform/WebMemoryDumpProvider.h" |
| 10 #include "wtf/OwnPtr.h" |
| 11 #include "wtf/text/WTFString.h" |
10 | 12 |
11 namespace blink { | 13 namespace blink { |
| 14 class WebMemoryAllocatorDump; |
12 | 15 |
13 class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProv
ider { | 16 class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProv
ider { |
14 public: | 17 public: |
15 static BlinkGCMemoryDumpProvider* instance(); | 18 static BlinkGCMemoryDumpProvider* instance(); |
16 ~BlinkGCMemoryDumpProvider() override; | 19 ~BlinkGCMemoryDumpProvider() override; |
17 | 20 |
18 // WebMemoryDumpProvider implementation. | 21 // WebMemoryDumpProvider implementation. |
19 bool onMemoryDump(WebProcessMemoryDump*) override; | 22 bool onMemoryDump(WebProcessMemoryDump*) override; |
20 | 23 |
| 24 WebMemoryAllocatorDump* createMemoryAllocatorDumpForLastGC(const String& abs
oluteName); |
| 25 void clearLastProcessMemoryDump(); |
| 26 |
21 private: | 27 private: |
22 BlinkGCMemoryDumpProvider(); | 28 BlinkGCMemoryDumpProvider(); |
| 29 |
| 30 OwnPtr<WebProcessMemoryDump> m_lastProcessMemoryDump; |
23 }; | 31 }; |
24 | 32 |
25 } // namespace blink | 33 } // namespace blink |
26 | 34 |
27 #endif | 35 #endif |
OLD | NEW |