| 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/v8_inspector/public/V8HeapProfilerAgent.h" | 8 #include "platform/v8_inspector/public/V8HeapProfilerAgent.h" |
| 9 #include "wtf/Forward.h" | 9 #include "wtf/Forward.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ~V8HeapProfilerAgentImpl() override; | 22 ~V8HeapProfilerAgentImpl() override; |
| 23 | 23 |
| 24 void setInspectorState(PassRefPtr<JSONObject> state) override { m_state = st
ate; } | 24 void setInspectorState(PassRefPtr<JSONObject> state) override { m_state = st
ate; } |
| 25 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr
ontend = frontend; } | 25 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr
ontend = frontend; } |
| 26 void clearFrontend() override; | 26 void clearFrontend() override; |
| 27 void restore() override; | 27 void restore() override; |
| 28 | 28 |
| 29 void collectGarbage(ErrorString*) override; | 29 void collectGarbage(ErrorString*) override; |
| 30 | 30 |
| 31 void enable(ErrorString*) override; | 31 void enable(ErrorString*) override; |
| 32 void startTrackingHeapObjects(ErrorString*, const bool* trackAllocations) ov
erride; | 32 void startTrackingHeapObjects(ErrorString*, const protocol::TypeBuilder::Opt
ionalValue<bool>& trackAllocations) override; |
| 33 void stopTrackingHeapObjects(ErrorString*, const bool* reportProgress) overr
ide; | 33 void stopTrackingHeapObjects(ErrorString*, const protocol::TypeBuilder::Opti
onalValue<bool>& reportProgress) override; |
| 34 | 34 |
| 35 void disable(ErrorString*) override; | 35 void disable(ErrorString*) override; |
| 36 | 36 |
| 37 void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override; | 37 void takeHeapSnapshot(ErrorString*, const protocol::TypeBuilder::OptionalVal
ue<bool>& reportProgress) override; |
| 38 | 38 |
| 39 void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectI
d, const String* objectGroup, RefPtr<protocol::TypeBuilder::Runtime::RemoteObjec
t>& result) override; | 39 void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectI
d, const protocol::TypeBuilder::OptionalValue<String>& objectGroup, OwnPtr<proto
col::TypeBuilder::Runtime::RemoteObject>* result) override; |
| 40 void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectI
d) override; | 40 void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectI
d) override; |
| 41 void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnaps
hotObjectId) override; | 41 void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnaps
hotObjectId) override; |
| 42 | 42 |
| 43 void startSampling(ErrorString*) override; | 43 void startSampling(ErrorString*) override; |
| 44 void stopSampling(ErrorString*, RefPtr<protocol::TypeBuilder::HeapProfiler::
SamplingHeapProfile>&) override; | 44 void stopSampling(ErrorString*, OwnPtr<protocol::TypeBuilder::HeapProfiler::
SamplingHeapProfile>*) override; |
| 45 | 45 |
| 46 void requestHeapStatsUpdate() override; | 46 void requestHeapStatsUpdate() override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void startTrackingHeapObjectsInternal(bool trackAllocations); | 49 void startTrackingHeapObjectsInternal(bool trackAllocations); |
| 50 void stopTrackingHeapObjectsInternal(); | 50 void stopTrackingHeapObjectsInternal(); |
| 51 | 51 |
| 52 v8::Isolate* m_isolate; | 52 v8::Isolate* m_isolate; |
| 53 V8RuntimeAgent* m_runtimeAgent; | 53 V8RuntimeAgent* m_runtimeAgent; |
| 54 protocol::Frontend::HeapProfiler* m_frontend; | 54 protocol::Frontend::HeapProfiler* m_frontend; |
| 55 RefPtr<JSONObject> m_state; | 55 RefPtr<JSONObject> m_state; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 #endif // !defined(V8HeapProfilerAgentImpl_h) | 60 #endif // !defined(V8HeapProfilerAgentImpl_h) |
| OLD | NEW |