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 #include "platform/web_memory_dump_provider_adapter.h" | 5 #include "content/child/web_memory_dump_provider_adapter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
10 #include "platform/web_process_memory_dump_impl.h" | 10 #include "content/child/web_process_memory_dump_impl.h" |
11 #include "public/platform/WebMemoryDumpProvider.h" | 11 #include "third_party/WebKit/public/platform/WebMemoryDumpProvider.h" |
12 | 12 |
13 namespace blink { | 13 namespace content { |
14 | 14 |
15 WebMemoryDumpProviderAdapter::WebMemoryDumpProviderAdapter( | 15 WebMemoryDumpProviderAdapter::WebMemoryDumpProviderAdapter( |
16 blink::WebMemoryDumpProvider* wmdp) | 16 blink::WebMemoryDumpProvider* wmdp) |
17 : web_memory_dump_provider_(wmdp), is_registered_(false) { | 17 : web_memory_dump_provider_(wmdp), is_registered_(false) { |
18 } | 18 } |
19 | 19 |
20 WebMemoryDumpProviderAdapter::~WebMemoryDumpProviderAdapter() { | 20 WebMemoryDumpProviderAdapter::~WebMemoryDumpProviderAdapter() { |
21 DCHECK(!is_registered_); | 21 DCHECK(!is_registered_); |
22 } | 22 } |
23 | 23 |
(...skipping 15 matching lines...) Expand all Loading... |
39 WebProcessMemoryDumpImpl web_pmd_impl(args.level_of_detail, pmd); | 39 WebProcessMemoryDumpImpl web_pmd_impl(args.level_of_detail, pmd); |
40 return web_memory_dump_provider_->onMemoryDump(level, &web_pmd_impl); | 40 return web_memory_dump_provider_->onMemoryDump(level, &web_pmd_impl); |
41 } | 41 } |
42 | 42 |
43 void WebMemoryDumpProviderAdapter::OnHeapProfilingEnabled(bool enabled) { | 43 void WebMemoryDumpProviderAdapter::OnHeapProfilingEnabled(bool enabled) { |
44 if (!web_memory_dump_provider_->supportsHeapProfiling()) | 44 if (!web_memory_dump_provider_->supportsHeapProfiling()) |
45 return; | 45 return; |
46 web_memory_dump_provider_->onHeapProfilingEnabled(enabled); | 46 web_memory_dump_provider_->onHeapProfilingEnabled(enabled); |
47 } | 47 } |
48 | 48 |
49 } // namespace blink | 49 } // namespace content |
OLD | NEW |