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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class InjectedScriptManager; | 45 class InjectedScriptManager; |
46 class HeapStatsUpdateTask; | 46 class HeapStatsUpdateTask; |
47 class ScriptHeapSnapshot; | 47 class ScriptHeapSnapshot; |
48 | 48 |
49 typedef String ErrorString; | 49 typedef String ErrorString; |
50 | 50 |
51 class InspectorHeapProfilerAgent FINAL : public InspectorBaseAgent<InspectorHeap
ProfilerAgent>, public InspectorBackendDispatcher::HeapProfilerCommandHandler { | 51 class InspectorHeapProfilerAgent FINAL : public InspectorBaseAgent<InspectorHeap
ProfilerAgent>, public InspectorBackendDispatcher::HeapProfilerCommandHandler { |
52 WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); WTF_MAKE_FAST_ALLOCATED; | 52 WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); |
| 53 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
53 public: | 54 public: |
54 static PassOwnPtr<InspectorHeapProfilerAgent> create(InjectedScriptManager*)
; | 55 static PassOwnPtrWillBeRawPtr<InspectorHeapProfilerAgent> create(InjectedScr
iptManager*); |
55 virtual ~InspectorHeapProfilerAgent(); | 56 virtual ~InspectorHeapProfilerAgent(); |
56 | 57 |
57 virtual void collectGarbage(ErrorString*) OVERRIDE; | 58 virtual void collectGarbage(ErrorString*) OVERRIDE; |
58 | 59 |
59 virtual void enable(ErrorString*) OVERRIDE; | 60 virtual void enable(ErrorString*) OVERRIDE; |
60 virtual void disable(ErrorString*) OVERRIDE; | 61 virtual void disable(ErrorString*) OVERRIDE; |
61 virtual void startTrackingHeapObjects(ErrorString*, const bool* trackAllocat
ions) OVERRIDE; | 62 virtual void startTrackingHeapObjects(ErrorString*, const bool* trackAllocat
ions) OVERRIDE; |
62 virtual void stopTrackingHeapObjects(ErrorString*, const bool* reportProgres
s) OVERRIDE; | 63 virtual void stopTrackingHeapObjects(ErrorString*, const bool* reportProgres
s) OVERRIDE; |
63 | 64 |
64 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 65 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
75 class HeapStatsUpdateTask; | 76 class HeapStatsUpdateTask; |
76 | 77 |
77 explicit InspectorHeapProfilerAgent(InjectedScriptManager*); | 78 explicit InspectorHeapProfilerAgent(InjectedScriptManager*); |
78 | 79 |
79 void requestHeapStatsUpdate(); | 80 void requestHeapStatsUpdate(); |
80 void pushHeapStatsUpdate(const uint32_t* const data, const int size); | 81 void pushHeapStatsUpdate(const uint32_t* const data, const int size); |
81 | 82 |
82 void startTrackingHeapObjectsInternal(bool trackAllocations); | 83 void startTrackingHeapObjectsInternal(bool trackAllocations); |
83 void stopTrackingHeapObjectsInternal(); | 84 void stopTrackingHeapObjectsInternal(); |
84 | 85 |
| 86 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
85 InjectedScriptManager* m_injectedScriptManager; | 87 InjectedScriptManager* m_injectedScriptManager; |
86 InspectorFrontend::HeapProfiler* m_frontend; | 88 InspectorFrontend::HeapProfiler* m_frontend; |
87 unsigned m_nextUserInitiatedHeapSnapshotNumber; | 89 unsigned m_nextUserInitiatedHeapSnapshotNumber; |
88 OwnPtr<HeapStatsUpdateTask> m_heapStatsUpdateTask; | 90 OwnPtr<HeapStatsUpdateTask> m_heapStatsUpdateTask; |
89 }; | 91 }; |
90 | 92 |
91 } // namespace blink | 93 } // namespace blink |
92 | 94 |
93 | 95 |
94 #endif // !defined(InspectorHeapProfilerAgent_h) | 96 #endif // !defined(InspectorHeapProfilerAgent_h) |
OLD | NEW |