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/InspectorProtocol.h" | 8 #include "platform/v8_inspector/Allocator.h" |
| 9 #include "platform/v8_inspector/protocol/Forward.h" |
9 #include "platform/v8_inspector/protocol/HeapProfiler.h" | 10 #include "platform/v8_inspector/protocol/HeapProfiler.h" |
10 | 11 |
11 #include <v8.h> | 12 #include <v8.h> |
12 | 13 |
13 namespace v8_inspector { | 14 namespace v8_inspector { |
14 | 15 |
15 class V8InspectorSessionImpl; | 16 class V8InspectorSessionImpl; |
16 | 17 |
17 namespace protocol = blink::protocol; | 18 using protocol::ErrorString; |
18 using blink::protocol::Maybe; | 19 using protocol::Maybe; |
19 | 20 |
20 class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend { | 21 class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend { |
21 PROTOCOL_DISALLOW_COPY(V8HeapProfilerAgentImpl); | 22 V8_INSPECTOR_DISALLOW_COPY(V8HeapProfilerAgentImpl); |
22 public: | 23 public: |
23 V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); | 24 V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); |
24 ~V8HeapProfilerAgentImpl() override; | 25 ~V8HeapProfilerAgentImpl() override; |
25 void restore(); | 26 void restore(); |
26 | 27 |
27 void collectGarbage(ErrorString*) override; | 28 void collectGarbage(ErrorString*) override; |
28 | 29 |
29 void enable(ErrorString*) override; | 30 void enable(ErrorString*) override; |
30 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati
ons) override; | 31 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati
ons) override; |
31 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress
) override; | 32 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress
) override; |
(...skipping 18 matching lines...) Expand all Loading... |
50 V8InspectorSessionImpl* m_session; | 51 V8InspectorSessionImpl* m_session; |
51 v8::Isolate* m_isolate; | 52 v8::Isolate* m_isolate; |
52 protocol::HeapProfiler::Frontend m_frontend; | 53 protocol::HeapProfiler::Frontend m_frontend; |
53 protocol::DictionaryValue* m_state; | 54 protocol::DictionaryValue* m_state; |
54 bool m_hasTimer; | 55 bool m_hasTimer; |
55 }; | 56 }; |
56 | 57 |
57 } // namespace v8_inspector | 58 } // namespace v8_inspector |
58 | 59 |
59 #endif // !defined(V8HeapProfilerAgentImpl_h) | 60 #endif // !defined(V8HeapProfilerAgentImpl_h) |
OLD | NEW |