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_MEMORY_DUMP_PROVIDER_ADAPTER_H_ | 5 #ifndef WebMemoryDumpProviderAdapter_h |
6 #define CONTENT_CHILD_WEB_MEMORY_DUMP_PROVIDER_ADAPTER_H_ | 6 #define WebMemoryDumpProviderAdapter_h |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/trace_event/memory_dump_provider.h" | 9 #include "base/trace_event/memory_dump_provider.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
| 12 |
12 class WebMemoryDumpProvider; | 13 class WebMemoryDumpProvider; |
13 } // namespace blink | |
14 | |
15 namespace content { | |
16 | 14 |
17 // Adapter class which makes it possible to register a WebMemoryDumpProvider ( | 15 // Adapter class which makes it possible to register a WebMemoryDumpProvider ( |
18 // from blink) to base::trace_event::MemoryDumpManager, which expects a | 16 // from blink) to base::trace_event::MemoryDumpManager, which expects a |
19 // MemoryDumpProvider instead. | 17 // MemoryDumpProvider instead. |
20 // This is essentially proxying the OnMemoryDump from chromium base to blink. | 18 // This is essentially proxying the OnMemoryDump from chromium base to blink. |
21 class WebMemoryDumpProviderAdapter | 19 class WebMemoryDumpProviderAdapter |
22 : public base::trace_event::MemoryDumpProvider { | 20 : public base::trace_event::MemoryDumpProvider { |
23 public: | 21 public: |
24 explicit WebMemoryDumpProviderAdapter(blink::WebMemoryDumpProvider* wmdp); | 22 explicit WebMemoryDumpProviderAdapter(blink::WebMemoryDumpProvider* wmdp); |
25 ~WebMemoryDumpProviderAdapter() override; | 23 ~WebMemoryDumpProviderAdapter() override; |
(...skipping 11 matching lines...) Expand all Loading... |
37 // The underlying WebMemoryDumpProvider instance to which the OnMemoryDump() | 35 // The underlying WebMemoryDumpProvider instance to which the OnMemoryDump() |
38 // calls will be proxied to. | 36 // calls will be proxied to. |
39 blink::WebMemoryDumpProvider* web_memory_dump_provider_; // Not owned. | 37 blink::WebMemoryDumpProvider* web_memory_dump_provider_; // Not owned. |
40 | 38 |
41 // True iff this has been registered with the MDM (and not unregistered yet). | 39 // True iff this has been registered with the MDM (and not unregistered yet). |
42 bool is_registered_; | 40 bool is_registered_; |
43 | 41 |
44 DISALLOW_COPY_AND_ASSIGN(WebMemoryDumpProviderAdapter); | 42 DISALLOW_COPY_AND_ASSIGN(WebMemoryDumpProviderAdapter); |
45 }; | 43 }; |
46 | 44 |
47 } // namespace content | 45 } // namespace blink |
48 | 46 |
49 #endif // CONTENT_CHILD_WEB_MEMORY_DUMP_PROVIDER_ADAPTER_H_ | 47 #endif // WebMemoryDumpProviderAdapter_h |
OLD | NEW |