Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.h

Issue 1702673002: DevTools: migrate remote debugging protocol generators to jinja2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class V8RuntimeAgent; 14 class V8RuntimeAgent;
15 15
16 typedef String ErrorString; 16 typedef String ErrorString;
17 17
18 using protocol::OptionalValue;
19
18 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent { 20 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent {
19 WTF_MAKE_NONCOPYABLE(V8HeapProfilerAgentImpl); 21 WTF_MAKE_NONCOPYABLE(V8HeapProfilerAgentImpl);
20 public: 22 public:
21 explicit V8HeapProfilerAgentImpl(v8::Isolate*, V8RuntimeAgent*); 23 explicit V8HeapProfilerAgentImpl(v8::Isolate*, V8RuntimeAgent*);
22 ~V8HeapProfilerAgentImpl() override; 24 ~V8HeapProfilerAgentImpl() override;
23 25
24 void setInspectorState(PassRefPtr<JSONObject> state) override { m_state = st ate; } 26 void setInspectorState(PassRefPtr<JSONObject> state) override { m_state = st ate; }
25 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr ontend = frontend; } 27 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr ontend = frontend; }
26 void clearFrontend() override; 28 void clearFrontend() override;
27 void restore() override; 29 void restore() override;
28 30
29 void collectGarbage(ErrorString*) override; 31 void collectGarbage(ErrorString*) override;
30 32
31 void enable(ErrorString*) override; 33 void enable(ErrorString*) override;
32 void startTrackingHeapObjects(ErrorString*, const bool* trackAllocations) ov erride; 34 void startTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& track Allocations) override;
33 void stopTrackingHeapObjects(ErrorString*, const bool* reportProgress) overr ide; 35 void stopTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& report Progress) override;
34 36
35 void disable(ErrorString*) override; 37 void disable(ErrorString*) override;
36 38
37 void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override; 39 void takeHeapSnapshot(ErrorString*, const OptionalValue<bool>& reportProgres s) override;
38 40
39 void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectI d, const String* objectGroup, RefPtr<protocol::TypeBuilder::Runtime::RemoteObjec t>& result) override; 41 void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectI d, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObj ect>* result) override;
40 void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectI d) override; 42 void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectI d) override;
41 void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnaps hotObjectId) override; 43 void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnaps hotObjectId) override;
42 44
43 void startSampling(ErrorString*) override; 45 void startSampling(ErrorString*) override;
44 void stopSampling(ErrorString*, RefPtr<protocol::TypeBuilder::HeapProfiler:: SamplingHeapProfile>&) override; 46 void stopSampling(ErrorString*, OwnPtr<protocol::HeapProfiler::SamplingHeapP rofile>*) override;
45 47
46 void requestHeapStatsUpdate() override; 48 void requestHeapStatsUpdate() override;
47 49
48 private: 50 private:
49 void startTrackingHeapObjectsInternal(bool trackAllocations); 51 void startTrackingHeapObjectsInternal(bool trackAllocations);
50 void stopTrackingHeapObjectsInternal(); 52 void stopTrackingHeapObjectsInternal();
51 53
52 v8::Isolate* m_isolate; 54 v8::Isolate* m_isolate;
53 V8RuntimeAgent* m_runtimeAgent; 55 V8RuntimeAgent* m_runtimeAgent;
54 protocol::Frontend::HeapProfiler* m_frontend; 56 protocol::Frontend::HeapProfiler* m_frontend;
55 RefPtr<JSONObject> m_state; 57 RefPtr<JSONObject> m_state;
56 }; 58 };
57 59
58 } // namespace blink 60 } // namespace blink
59 61
60 #endif // !defined(V8HeapProfilerAgentImpl_h) 62 #endif // !defined(V8HeapProfilerAgentImpl_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698