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 "third_party/WebKit/public/platform/WebMemoryAllocatorDump.h"
11 namespace trace_event
{
12 class MemoryAllocatorDump
;
14 } // namespace trace_event
18 // Implements the blink::WebMemoryAllocatorDump interface by means of proxying
19 // the Add*() calls to the underlying base::trace_event::MemoryAllocatorDump
21 class WebMemoryAllocatorDumpImpl
: public blink::WebMemoryAllocatorDump
{
23 explicit WebMemoryAllocatorDumpImpl(
24 base::trace_event::MemoryAllocatorDump
* memory_allocator_dump
);
25 virtual ~WebMemoryAllocatorDumpImpl();
27 // blink::WebMemoryAllocatorDump implementation.
28 virtual void AddScalar(const char* name
,
31 virtual void AddScalarF(const char* name
,
34 virtual void AddString(const char* name
,
36 const blink::WebString
& value
);
38 virtual blink::WebMemoryAllocatorDumpGuid
guid() const;
41 base::trace_event::MemoryAllocatorDump
* memory_allocator_dump_
; // Not owned.
42 blink::WebMemoryAllocatorDumpGuid guid_
;
44 DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDumpImpl
);
47 } // namespace content
49 #endif // CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_