Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: third_party/WebKit/public/platform/WebMemoryDumpProvider.h

Issue 1642023007: Refactoring: Move functions from WebMemoryDumpProviderAdapter to PartitionAllocMemoryDumpProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: primiano's review Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 WebMemoryDumpProvider_h 5 #ifndef WebMemoryDumpProvider_h
6 #define WebMemoryDumpProvider_h 6 #define WebMemoryDumpProvider_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class WebProcessMemoryDump; 12 class WebProcessMemoryDump;
13 13
14 // Used to specify the type of memory dump the WebMemoryDumpProvider should 14 // Used to specify the type of memory dump the WebMemoryDumpProvider should
15 // generate on dump requests. 15 // generate on dump requests.
16 // TODO(hajimehoshi): Remove this and use base::trace_event::
17 // MemoryDumpLevelOfDetail instead.
16 enum class WebMemoryDumpLevelOfDetail { 18 enum class WebMemoryDumpLevelOfDetail {
17 Light, 19 Light,
18 Detailed 20 Detailed
19 }; 21 };
20 22
21 // Base interface to be part of the memory tracing infrastructure. Blink classes 23 // Base interface to be part of the memory tracing infrastructure. Blink classes
22 // can implement this interface and register themselves (see 24 // can implement this interface and register themselves (see
23 // Platform::registerMemoryDumpProvider()) to dump stats for their allocators. 25 // Platform::registerMemoryDumpProvider()) to dump stats for their allocators.
24 class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider { 26 class BLINK_PLATFORM_EXPORT WebMemoryDumpProvider {
25 public: 27 public:
(...skipping 12 matching lines...) Expand all
38 // considered invalid. 40 // considered invalid.
39 virtual bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) = 0; 41 virtual bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) = 0;
40 42
41 // Because Blink cannot depend on base, heap profiling bookkeeping has to 43 // Because Blink cannot depend on base, heap profiling bookkeeping has to
42 // be done in the glue layer for now. This method allows the glue layer to 44 // be done in the glue layer for now. This method allows the glue layer to
43 // detect whether the current dump provider supports heap profiling. 45 // detect whether the current dump provider supports heap profiling.
44 // TODO(ruuda): Remove once wtf can depend on base and do bookkeeping in the 46 // TODO(ruuda): Remove once wtf can depend on base and do bookkeeping in the
45 // provider itself. 47 // provider itself.
46 virtual bool supportsHeapProfiling() { return false; } 48 virtual bool supportsHeapProfiling() { return false; }
47 49
48 // Called by the memory dump manager to enable heap profiling (with 50 // Called by the memory dump manager to enable heap profiling (with true) or
49 // non-null hook functions) or called to disable heap profiling (with null 51 // called to disable heap profiling (with false).
50 // pointers). 52 virtual void onHeapProfilingEnabled(bool enabled) {}
51 virtual void onHeapProfilingEnabled(AllocationHook* allocationHook, FreeHook * freeHook) {}
52 }; 53 };
53 54
54 } // namespace blink 55 } // namespace blink
55 56
56 #endif // WebMemoryDumpProvider_h 57 #endif // WebMemoryDumpProvider_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/DEPS ('k') | third_party/WebKit/public/platform/WebProcessMemoryDump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698