[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / child / web_memory_allocator_dump_impl.h
blob23b71557778fd462495d1775b2642c9c3763395e
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"
11 namespace base {
12 namespace trace_event {
13 class MemoryAllocatorDump;
14 } // namespace base
15 } // namespace trace_event
17 namespace content {
19 // Implements the blink::WebMemoryAllocatorDump interface by means of proxying
20 // the Add*() calls to the underlying base::trace_event::MemoryAllocatorDump
21 // instance.
22 class WebMemoryAllocatorDumpImpl : public blink::WebMemoryAllocatorDump {
23 public:
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,
30 const char* units,
31 uint64 value);
32 virtual void AddScalarF(const char* name,
33 const char* units,
34 double value);
35 virtual void AddString(const char* name,
36 const char* units,
37 const blink::WebString& value);
39 private:
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_