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

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

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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::Maybe; 18 using protocol::Maybe;
19 19
20 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent { 20 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent {
21 WTF_MAKE_NONCOPYABLE(V8HeapProfilerAgentImpl); 21 WTF_MAKE_NONCOPYABLE(V8HeapProfilerAgentImpl);
22 public: 22 public:
23 explicit V8HeapProfilerAgentImpl(v8::Isolate*, V8RuntimeAgent*); 23 explicit V8HeapProfilerAgentImpl(v8::Isolate*, V8RuntimeAgent*);
24 ~V8HeapProfilerAgentImpl() override; 24 ~V8HeapProfilerAgentImpl() override;
25 25
26 void setInspectorState(PassRefPtr<JSONObject> state) override { m_state = st ate; } 26 void setInspectorState(PassRefPtr<protocol::DictionaryValue> state) override { m_state = state; }
27 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr ontend = frontend; } 27 void setFrontend(protocol::Frontend::HeapProfiler* frontend) override { m_fr ontend = frontend; }
28 void clearFrontend() override; 28 void clearFrontend() override;
29 void restore() override; 29 void restore() override;
30 30
31 void collectGarbage(ErrorString*) override; 31 void collectGarbage(ErrorString*) override;
32 32
33 void enable(ErrorString*) override; 33 void enable(ErrorString*) override;
34 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati ons) override; 34 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati ons) override;
35 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress ) override; 35 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress ) override;
36 36
(...skipping 10 matching lines...) Expand all
47 47
48 void requestHeapStatsUpdate() override; 48 void requestHeapStatsUpdate() override;
49 49
50 private: 50 private:
51 void startTrackingHeapObjectsInternal(bool trackAllocations); 51 void startTrackingHeapObjectsInternal(bool trackAllocations);
52 void stopTrackingHeapObjectsInternal(); 52 void stopTrackingHeapObjectsInternal();
53 53
54 v8::Isolate* m_isolate; 54 v8::Isolate* m_isolate;
55 V8RuntimeAgent* m_runtimeAgent; 55 V8RuntimeAgent* m_runtimeAgent;
56 protocol::Frontend::HeapProfiler* m_frontend; 56 protocol::Frontend::HeapProfiler* m_frontend;
57 RefPtr<JSONObject> m_state; 57 RefPtr<protocol::DictionaryValue> m_state;
58 }; 58 };
59 59
60 } // namespace blink 60 } // namespace blink
61 61
62 #endif // !defined(V8HeapProfilerAgentImpl_h) 62 #endif // !defined(V8HeapProfilerAgentImpl_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698