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

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

Issue 2295913003: [DevTools] Switch from platform/v8_inspector to v8/v8-inspector.h. (Closed)
Patch Set: rebase Created 4 years, 3 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8ProfilerAgentImpl_h
6 #define V8ProfilerAgentImpl_h
7
8 #include "platform/v8_inspector/Allocator.h"
9 #include "platform/v8_inspector/protocol/Forward.h"
10 #include "platform/v8_inspector/protocol/Profiler.h"
11
12 #include <vector>
13
14 namespace v8 {
15 class CpuProfiler;
16 class Isolate;
17 }
18
19 namespace v8_inspector {
20
21 class V8InspectorSessionImpl;
22
23 using protocol::ErrorString;
24
25 class V8ProfilerAgentImpl : public protocol::Profiler::Backend {
26 V8_INSPECTOR_DISALLOW_COPY(V8ProfilerAgentImpl);
27 public:
28 V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, pro tocol::DictionaryValue* state);
29 ~V8ProfilerAgentImpl() override;
30
31 bool enabled() const { return m_enabled; }
32 void restore();
33
34 void enable(ErrorString*) override;
35 void disable(ErrorString*) override;
36 void setSamplingInterval(ErrorString*, int) override;
37 void start(ErrorString*) override;
38 void stop(ErrorString*, std::unique_ptr<protocol::Profiler::Profile>*) overr ide;
39
40 void consoleProfile(const String16& title);
41 void consoleProfileEnd(const String16& title);
42
43 private:
44 String16 nextProfileId();
45 v8::CpuProfiler* profiler();
46
47 void startProfiling(const String16& title);
48 std::unique_ptr<protocol::Profiler::Profile> stopProfiling(const String16& t itle, bool serialize);
49
50 bool isRecording() const;
51
52 V8InspectorSessionImpl* m_session;
53 v8::Isolate* m_isolate;
54 v8::CpuProfiler* m_profiler;
55 protocol::DictionaryValue* m_state;
56 protocol::Profiler::Frontend m_frontend;
57 bool m_enabled;
58 bool m_recordingCPUProfile;
59 class ProfileDescriptor;
60 std::vector<ProfileDescriptor> m_startedProfiles;
61 String16 m_frontendInitiatedProfileId;
62 };
63
64 } // namespace v8_inspector
65
66 #endif // !defined(V8ProfilerAgentImpl_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698