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
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_
6 #define CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_
8 #include "base/memory/scoped_vector.h"
9 #include "third_party/WebKit/public/platform/WebMemoryAllocatorDump.h"
12 namespace trace_event
{
13 class MemoryAllocatorDump
;
15 } // namespace trace_event
19 // Implements the blink::WebMemoryAllocatorDump interface by means of proxying
20 // the Add*() calls to the underlying base::trace_event::MemoryAllocatorDump
22 class WebMemoryAllocatorDumpImpl
: public blink::WebMemoryAllocatorDump
{
24 explicit WebMemoryAllocatorDumpImpl(
25 base::trace_event::MemoryAllocatorDump
* memory_allocator_dump
);
26 virtual ~WebMemoryAllocatorDumpImpl();
28 // blink::WebMemoryAllocatorDump implementation.
29 virtual void AddScalar(const char* name
,
32 virtual void AddScalarF(const char* name
,
35 virtual void AddString(const char* name
,
37 const blink::WebString
& value
);
40 base::trace_event::MemoryAllocatorDump
* memory_allocator_dump_
; // Not owned.
42 DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDumpImpl
);
45 } // namespace content
47 #endif // CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_