OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 V8HeapProfilerAgentImpl_h | 5 #ifndef V8HeapProfilerAgentImpl_h |
6 #define V8HeapProfilerAgentImpl_h | 6 #define V8HeapProfilerAgentImpl_h |
7 | 7 |
8 #include "platform/inspector_protocol/Allocator.h" | 8 #include "platform/inspector_protocol/Allocator.h" |
9 #include "platform/v8_inspector/public/V8HeapProfilerAgent.h" | 9 #include "platform/inspector_protocol/Backend.h" |
| 10 #include "platform/inspector_protocol/Frontend.h" |
| 11 #include "platform/inspector_protocol/String16.h" |
10 | 12 |
11 namespace blink { | 13 namespace blink { |
12 | 14 |
13 class V8InspectorSessionImpl; | 15 class V8InspectorSessionImpl; |
14 | 16 |
15 using protocol::Maybe; | 17 using protocol::Maybe; |
16 | 18 |
17 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent { | 19 class V8HeapProfilerAgentImpl : public protocol::Backend::HeapProfiler { |
18 PROTOCOL_DISALLOW_COPY(V8HeapProfilerAgentImpl); | 20 PROTOCOL_DISALLOW_COPY(V8HeapProfilerAgentImpl); |
19 public: | 21 public: |
20 explicit V8HeapProfilerAgentImpl(V8InspectorSessionImpl*); | 22 V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::Frontend::HeapPro
filer*, protocol::DictionaryValue* state); |
21 ~V8HeapProfilerAgentImpl() override; | 23 ~V8HeapProfilerAgentImpl() override; |
22 | 24 void restore(); |
23 void setInspectorState(protocol::DictionaryValue* state) override { m_state
= state; } | |
24 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr
ontend = frontend; } | |
25 void clearFrontend() override; | |
26 void restore() override; | |
27 | 25 |
28 void collectGarbage(ErrorString*) override; | 26 void collectGarbage(ErrorString*) override; |
29 | 27 |
30 void enable(ErrorString*) override; | 28 void enable(ErrorString*) override; |
31 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati
ons) override; | 29 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati
ons) override; |
32 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress
) override; | 30 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress
) override; |
33 | 31 |
34 void disable(ErrorString*) override; | 32 void disable(ErrorString*) override; |
35 | 33 |
36 void takeHeapSnapshot(ErrorString*, const Maybe<bool>& reportProgress) overr
ide; | 34 void takeHeapSnapshot(ErrorString*, const Maybe<bool>& reportProgress) overr
ide; |
(...skipping 14 matching lines...) Expand all Loading... |
51 V8InspectorSessionImpl* m_session; | 49 V8InspectorSessionImpl* m_session; |
52 v8::Isolate* m_isolate; | 50 v8::Isolate* m_isolate; |
53 protocol::Frontend::HeapProfiler* m_frontend; | 51 protocol::Frontend::HeapProfiler* m_frontend; |
54 protocol::DictionaryValue* m_state; | 52 protocol::DictionaryValue* m_state; |
55 bool m_hasTimer; | 53 bool m_hasTimer; |
56 }; | 54 }; |
57 | 55 |
58 } // namespace blink | 56 } // namespace blink |
59 | 57 |
60 #endif // !defined(V8HeapProfilerAgentImpl_h) | 58 #endif // !defined(V8HeapProfilerAgentImpl_h) |
OLD | NEW |