| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project 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 V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ | 5 #ifndef V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ |
| 6 #define V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ | 6 #define V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 Response takePreciseCoverage( | 43 Response takePreciseCoverage( |
| 44 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>* | 44 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>* |
| 45 out_result) override; | 45 out_result) override; |
| 46 Response getBestEffortCoverage( | 46 Response getBestEffortCoverage( |
| 47 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>* | 47 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>* |
| 48 out_result) override; | 48 out_result) override; |
| 49 | 49 |
| 50 void consoleProfile(const String16& title); | 50 void consoleProfile(const String16& title); |
| 51 void consoleProfileEnd(const String16& title); | 51 void consoleProfileEnd(const String16& title); |
| 52 | 52 |
| 53 bool idleStarted(); | |
| 54 bool idleFinished(); | |
| 55 | |
| 56 private: | 53 private: |
| 57 String16 nextProfileId(); | 54 String16 nextProfileId(); |
| 58 | 55 |
| 59 void startProfiling(const String16& title); | 56 void startProfiling(const String16& title); |
| 60 std::unique_ptr<protocol::Profiler::Profile> stopProfiling( | 57 std::unique_ptr<protocol::Profiler::Profile> stopProfiling( |
| 61 const String16& title, bool serialize); | 58 const String16& title, bool serialize); |
| 62 | 59 |
| 63 V8InspectorSessionImpl* m_session; | 60 V8InspectorSessionImpl* m_session; |
| 64 v8::Isolate* m_isolate; | 61 v8::Isolate* m_isolate; |
| 65 v8::CpuProfiler* m_profiler = nullptr; | 62 v8::CpuProfiler* m_profiler = nullptr; |
| 66 protocol::DictionaryValue* m_state; | 63 protocol::DictionaryValue* m_state; |
| 67 protocol::Profiler::Frontend m_frontend; | 64 protocol::Profiler::Frontend m_frontend; |
| 68 bool m_enabled = false; | 65 bool m_enabled = false; |
| 69 bool m_recordingCPUProfile = false; | 66 bool m_recordingCPUProfile = false; |
| 70 class ProfileDescriptor; | 67 class ProfileDescriptor; |
| 71 std::vector<ProfileDescriptor> m_startedProfiles; | 68 std::vector<ProfileDescriptor> m_startedProfiles; |
| 72 String16 m_frontendInitiatedProfileId; | 69 String16 m_frontendInitiatedProfileId; |
| 73 bool m_idle = false; | |
| 74 int m_startedProfilesCount = 0; | 70 int m_startedProfilesCount = 0; |
| 75 | 71 |
| 76 DISALLOW_COPY_AND_ASSIGN(V8ProfilerAgentImpl); | 72 DISALLOW_COPY_AND_ASSIGN(V8ProfilerAgentImpl); |
| 77 }; | 73 }; |
| 78 | 74 |
| 79 } // namespace v8_inspector | 75 } // namespace v8_inspector |
| 80 | 76 |
| 81 #endif // V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ | 77 #endif // V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ |
| OLD | NEW |