| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class InjectedScriptManager; | 46 class InjectedScriptManager; |
| 47 class HeapStatsUpdateTask; | 47 class HeapStatsUpdateTask; |
| 48 | 48 |
| 49 typedef String ErrorString; | 49 typedef String ErrorString; |
| 50 | 50 |
| 51 class CORE_EXPORT InspectorHeapProfilerAgent final : public InspectorBaseAgent<I
nspectorHeapProfilerAgent, InspectorFrontend::HeapProfiler>, public InspectorBac
kendDispatcher::HeapProfilerCommandHandler { | 51 class CORE_EXPORT InspectorHeapProfilerAgent final : public InspectorBaseAgent<I
nspectorHeapProfilerAgent, InspectorFrontend::HeapProfiler>, public InspectorBac
kendDispatcher::HeapProfilerCommandHandler { |
| 52 WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); | 52 WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); |
| 53 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorHeapProfilerAgent); | 53 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorHeapProfilerAgent); |
| 54 public: | 54 public: |
| 55 static PassOwnPtrWillBeRawPtr<InspectorHeapProfilerAgent> create(InjectedScr
iptManager*); | 55 static PassOwnPtrWillBeRawPtr<InspectorHeapProfilerAgent> create(InjectedScr
iptManager*); |
| 56 virtual ~InspectorHeapProfilerAgent(); | 56 ~InspectorHeapProfilerAgent() override; |
| 57 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
| 58 | 58 |
| 59 virtual void collectGarbage(ErrorString*) override; | 59 void collectGarbage(ErrorString*) override; |
| 60 | 60 |
| 61 virtual void enable(ErrorString*) override; | 61 void enable(ErrorString*) override; |
| 62 virtual void startTrackingHeapObjects(ErrorString*, const bool* trackAllocat
ions) override; | 62 void startTrackingHeapObjects(ErrorString*, const bool* trackAllocations) ov
erride; |
| 63 virtual void stopTrackingHeapObjects(ErrorString*, const bool* reportProgres
s) override; | 63 void stopTrackingHeapObjects(ErrorString*, const bool* reportProgress) overr
ide; |
| 64 | 64 |
| 65 void disable(ErrorString*) override; | 65 void disable(ErrorString*) override; |
| 66 void restore() override; | 66 void restore() override; |
| 67 | 67 |
| 68 virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress) over
ride; | 68 void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override; |
| 69 | 69 |
| 70 virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapsho
tObjectId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>
& result) override; | 70 void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectI
d, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result
) override; |
| 71 virtual void addInspectedHeapObject(ErrorString*, const String& inspectedHea
pObjectId) override; | 71 void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectI
d) override; |
| 72 virtual void getHeapObjectId(ErrorString*, const String& objectId, String* h
eapSnapshotObjectId) override; | 72 void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnaps
hotObjectId) override; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 class HeapStatsStream; | 75 class HeapStatsStream; |
| 76 class HeapStatsUpdateTask; | 76 class HeapStatsUpdateTask; |
| 77 | 77 |
| 78 explicit InspectorHeapProfilerAgent(InjectedScriptManager*); | 78 explicit InspectorHeapProfilerAgent(InjectedScriptManager*); |
| 79 | 79 |
| 80 void requestHeapStatsUpdate(); | 80 void requestHeapStatsUpdate(); |
| 81 void pushHeapStatsUpdate(const uint32_t* const data, const int size); | 81 void pushHeapStatsUpdate(const uint32_t* const data, const int size); |
| 82 | 82 |
| 83 void startTrackingHeapObjectsInternal(bool trackAllocations); | 83 void startTrackingHeapObjectsInternal(bool trackAllocations); |
| 84 void stopTrackingHeapObjectsInternal(); | 84 void stopTrackingHeapObjectsInternal(); |
| 85 | 85 |
| 86 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 86 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 87 OwnPtrWillBeMember<HeapStatsUpdateTask> m_heapStatsUpdateTask; | 87 OwnPtrWillBeMember<HeapStatsUpdateTask> m_heapStatsUpdateTask; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| 91 | 91 |
| 92 | 92 |
| 93 #endif // !defined(InspectorHeapProfilerAgent_h) | 93 #endif // !defined(InspectorHeapProfilerAgent_h) |
| OLD | NEW |