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 CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
6 #define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 6 #define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const blink::WebString& dump_name_prefix) override; | 68 const blink::WebString& dump_name_prefix) override; |
69 | 69 |
70 const base::trace_event::ProcessMemoryDump* process_memory_dump() const { | 70 const base::trace_event::ProcessMemoryDump* process_memory_dump() const { |
71 return process_memory_dump_; | 71 return process_memory_dump_; |
72 } | 72 } |
73 | 73 |
74 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump( | 74 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump( |
75 const std::string& name, | 75 const std::string& name, |
76 base::DiscardableMemory* discardable); | 76 base::DiscardableMemory* discardable); |
77 | 77 |
| 78 base::trace_event::ProcessMemoryDump* getProcessMemoryDump() override; |
| 79 |
78 private: | 80 private: |
79 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpImplTest, IntegrationTest); | 81 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpImplTest, IntegrationTest); |
80 | 82 |
81 blink::WebMemoryAllocatorDump* createWebMemoryAllocatorDump( | 83 blink::WebMemoryAllocatorDump* createWebMemoryAllocatorDump( |
82 base::trace_event::MemoryAllocatorDump* memory_allocator_dump); | 84 base::trace_event::MemoryAllocatorDump* memory_allocator_dump); |
83 | 85 |
84 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). | 86 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). |
85 scoped_ptr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_; | 87 scoped_ptr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_; |
86 | 88 |
87 // The underlying ProcessMemoryDump instance to which the | 89 // The underlying ProcessMemoryDump instance to which the |
(...skipping 14 matching lines...) Expand all Loading... |
102 | 104 |
103 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. | 105 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. |
104 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; | 106 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; |
105 | 107 |
106 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); | 108 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); |
107 }; | 109 }; |
108 | 110 |
109 } // namespace content | 111 } // namespace content |
110 | 112 |
111 #endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 113 #endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
OLD | NEW |