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/Allocator.h" | 8 #include "platform/inspector_protocol/Allocator.h" |
9 #include "platform/inspector_protocol/Frontend.h" | 9 #include "platform/inspector_protocol/Frontend.h" |
10 #include "platform/inspector_protocol/String16.h" | 10 #include "platform/inspector_protocol/String16.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 void enable(ErrorString*) override; | 34 void enable(ErrorString*) override; |
35 void disable(ErrorString*) override; | 35 void disable(ErrorString*) override; |
36 void setSamplingInterval(ErrorString*, int) override; | 36 void setSamplingInterval(ErrorString*, int) override; |
37 void start(ErrorString*) override; | 37 void start(ErrorString*) override; |
38 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override; | 38 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override; |
39 | 39 |
40 void consoleProfile(const String16& title); | 40 void consoleProfile(const String16& title); |
41 void consoleProfileEnd(const String16& title); | 41 void consoleProfileEnd(const String16& title); |
42 | 42 |
43 void idleStarted() override; | |
44 void idleFinished() override; | |
45 | |
46 private: | 43 private: |
47 String16 nextProfileId(); | 44 String16 nextProfileId(); |
48 | 45 |
49 void startProfiling(const String16& title); | 46 void startProfiling(const String16& title); |
50 PassOwnPtr<protocol::Profiler::CPUProfile> stopProfiling(const String16& tit
le, bool serialize); | 47 PassOwnPtr<protocol::Profiler::CPUProfile> stopProfiling(const String16& tit
le, bool serialize); |
51 | 48 |
52 bool isRecording() const; | 49 bool isRecording() const; |
53 | 50 |
54 V8InspectorSessionImpl* m_session; | 51 V8InspectorSessionImpl* m_session; |
55 v8::Isolate* m_isolate; | 52 v8::Isolate* m_isolate; |
56 protocol::DictionaryValue* m_state; | 53 protocol::DictionaryValue* m_state; |
57 protocol::Frontend::Profiler* m_frontend; | 54 protocol::Frontend::Profiler* m_frontend; |
58 bool m_enabled; | 55 bool m_enabled; |
59 bool m_recordingCPUProfile; | 56 bool m_recordingCPUProfile; |
60 class ProfileDescriptor; | 57 class ProfileDescriptor; |
61 protocol::Vector<ProfileDescriptor> m_startedProfiles; | 58 protocol::Vector<ProfileDescriptor> m_startedProfiles; |
62 String16 m_frontendInitiatedProfileId; | 59 String16 m_frontendInitiatedProfileId; |
63 }; | 60 }; |
64 | 61 |
65 } // namespace blink | 62 } // namespace blink |
66 | 63 |
67 | 64 |
68 #endif // !defined(V8ProfilerAgentImpl_h) | 65 #endif // !defined(V8ProfilerAgentImpl_h) |
OLD | NEW |