OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 V8ProfilerAgentImpl_h | 5 #ifndef V8ProfilerAgentImpl_h |
6 #define V8ProfilerAgentImpl_h | 6 #define V8ProfilerAgentImpl_h |
7 | 7 |
8 #include "platform/inspector_protocol/InspectorProtocol.h" | 8 #include "platform/v8_inspector/Allocator.h" |
| 9 #include "platform/v8_inspector/protocol/Forward.h" |
9 #include "platform/v8_inspector/protocol/Profiler.h" | 10 #include "platform/v8_inspector/protocol/Profiler.h" |
10 | 11 |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 class CpuProfiler; | 15 class CpuProfiler; |
15 class Isolate; | 16 class Isolate; |
16 } | 17 } |
17 | 18 |
18 namespace v8_inspector { | 19 namespace v8_inspector { |
19 | 20 |
20 class V8InspectorSessionImpl; | 21 class V8InspectorSessionImpl; |
21 | 22 |
22 namespace protocol = blink::protocol; | 23 using protocol::ErrorString; |
23 | 24 |
24 class V8ProfilerAgentImpl : public protocol::Profiler::Backend { | 25 class V8ProfilerAgentImpl : public protocol::Profiler::Backend { |
25 PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl); | 26 V8_INSPECTOR_DISALLOW_COPY(V8ProfilerAgentImpl); |
26 public: | 27 public: |
27 V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, pro
tocol::DictionaryValue* state); | 28 V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, pro
tocol::DictionaryValue* state); |
28 ~V8ProfilerAgentImpl() override; | 29 ~V8ProfilerAgentImpl() override; |
29 | 30 |
30 bool enabled() const { return m_enabled; } | 31 bool enabled() const { return m_enabled; } |
31 void restore(); | 32 void restore(); |
32 | 33 |
33 void enable(ErrorString*) override; | 34 void enable(ErrorString*) override; |
34 void disable(ErrorString*) override; | 35 void disable(ErrorString*) override; |
35 void setSamplingInterval(ErrorString*, int) override; | 36 void setSamplingInterval(ErrorString*, int) override; |
(...skipping 20 matching lines...) Expand all Loading... |
56 bool m_enabled; | 57 bool m_enabled; |
57 bool m_recordingCPUProfile; | 58 bool m_recordingCPUProfile; |
58 class ProfileDescriptor; | 59 class ProfileDescriptor; |
59 std::vector<ProfileDescriptor> m_startedProfiles; | 60 std::vector<ProfileDescriptor> m_startedProfiles; |
60 String16 m_frontendInitiatedProfileId; | 61 String16 m_frontendInitiatedProfileId; |
61 }; | 62 }; |
62 | 63 |
63 } // namespace v8_inspector | 64 } // namespace v8_inspector |
64 | 65 |
65 #endif // !defined(V8ProfilerAgentImpl_h) | 66 #endif // !defined(V8ProfilerAgentImpl_h) |
OLD | NEW |