Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / child / web_memory_allocator_dump_impl.h
blobd5d97d3913d339b1b65df8c99ff6006fab7469b0
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 virtual blink::WebMemoryAllocatorDumpGuid guid() const;
41 private:
42 base::trace_event::MemoryAllocatorDump* memory_allocator_dump_; // Not owned.
43 blink::WebMemoryAllocatorDumpGuid guid_;
45 DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDumpImpl);
48 } // namespace content
50 #endif // CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_