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 CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 5 #ifndef WebProcessMemoryDumpImpl_h |
| 6 #define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 6 #define WebProcessMemoryDumpImpl_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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
|
kinuko
2016/02/04 11:25:34
Hmm... I haven't realized but are we just going to
haraken
2016/02/04 11:30:56
We don't want to allow scoped_ptr.
By the way, wh
hajimehoshi
2016/02/04 12:17:52
Done.
| |
| 13 #include "base/trace_event/memory_dump_request_args.h" | 13 #include "base/trace_event/memory_dump_request_args.h" |
| 14 #include "content/common/content_export.h" | 14 #include "public/platform/WebProcessMemoryDump.h" |
| 15 #include "third_party/WebKit/public/platform/WebProcessMemoryDump.h" | |
| 16 | 15 |
| 17 namespace base { | 16 namespace base { |
| 18 class DiscardableMemory; | 17 class DiscardableMemory; |
| 19 namespace trace_event { | 18 namespace trace_event { |
| 20 class MemoryAllocatorDump; | 19 class MemoryAllocatorDump; |
| 21 class ProcessMemoryDump; | 20 class ProcessMemoryDump; |
| 22 } // namespace base | 21 } // namespace base |
| 23 } // namespace trace_event | 22 } // namespace trace_event |
| 24 | 23 |
| 25 namespace skia { | 24 namespace skia { |
| 26 class SkiaTraceMemoryDumpImpl; | 25 class SkiaTraceMemoryDumpImpl; |
| 27 } // namespace skia | 26 } // namespace skia |
| 28 | 27 |
| 29 namespace content { | 28 namespace blink { |
| 30 | 29 |
| 31 class WebMemoryAllocatorDumpImpl; | 30 class WebMemoryAllocatorDumpImpl; |
| 32 | 31 |
| 33 // Implements the blink::WebProcessMemoryDump interface by means of proxying the | 32 // Implements the blink::WebProcessMemoryDump interface by means of proxying the |
| 34 // calls to createMemoryAllocatorDump() to the underlying | 33 // calls to createMemoryAllocatorDump() to the underlying |
| 35 // base::trace_event::ProcessMemoryDump instance. | 34 // base::trace_event::ProcessMemoryDump instance. |
| 36 class CONTENT_EXPORT WebProcessMemoryDumpImpl final | 35 class BLINK_EXPORT WebProcessMemoryDumpImpl final |
| 37 : public NON_EXPORTED_BASE(blink::WebProcessMemoryDump) { | 36 : public NON_EXPORTED_BASE(blink::WebProcessMemoryDump) { |
| 38 public: | 37 public: |
| 39 // Creates a standalone WebProcessMemoryDumpImp, which owns the underlying | 38 // Creates a standalone WebProcessMemoryDumpImp, which owns the underlying |
| 40 // ProcessMemoryDump. | 39 // ProcessMemoryDump. |
| 41 WebProcessMemoryDumpImpl(); | 40 WebProcessMemoryDumpImpl(); |
| 42 | 41 |
| 43 // Wraps (without owning) an existing ProcessMemoryDump. | 42 // Wraps (without owning) an existing ProcessMemoryDump. |
| 44 explicit WebProcessMemoryDumpImpl( | 43 explicit WebProcessMemoryDumpImpl( |
| 45 base::trace_event::MemoryDumpLevelOfDetail level_of_detail, | 44 base::trace_event::MemoryDumpLevelOfDetail level_of_detail, |
| 46 base::trace_event::ProcessMemoryDump* process_memory_dump); | 45 base::trace_event::ProcessMemoryDump* process_memory_dump); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 base::ScopedPtrHashMap<base::trace_event::MemoryAllocatorDump*, | 104 base::ScopedPtrHashMap<base::trace_event::MemoryAllocatorDump*, |
| 106 scoped_ptr<WebMemoryAllocatorDumpImpl>> | 105 scoped_ptr<WebMemoryAllocatorDumpImpl>> |
| 107 memory_allocator_dumps_; | 106 memory_allocator_dumps_; |
| 108 | 107 |
| 109 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. | 108 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. |
| 110 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; | 109 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; |
| 111 | 110 |
| 112 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); | 111 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); |
| 113 }; | 112 }; |
| 114 | 113 |
| 115 } // namespace content | 114 } // namespace blink |
| 116 | 115 |
| 117 #endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ | 116 #endif // WebProcessMemoryDumpImpl_h |
| OLD | NEW |