| 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" |
| 11 #include "platform/v8_inspector/public/V8ProfilerAgent.h" | 11 #include "platform/v8_inspector/public/V8ProfilerAgent.h" |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 class Isolate; | 14 class Isolate; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class V8DebuggerImpl; | |
| 20 class V8InspectorSessionImpl; | 19 class V8InspectorSessionImpl; |
| 21 | 20 |
| 22 class V8ProfilerAgentImpl : public V8ProfilerAgent { | 21 class V8ProfilerAgentImpl : public V8ProfilerAgent { |
| 23 PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl); | 22 PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl); |
| 24 public: | 23 public: |
| 25 explicit V8ProfilerAgentImpl(V8InspectorSessionImpl*); | 24 explicit V8ProfilerAgentImpl(V8InspectorSessionImpl*); |
| 26 ~V8ProfilerAgentImpl() override; | 25 ~V8ProfilerAgentImpl() override; |
| 27 | 26 |
| 28 bool enabled() const { return m_enabled; } | 27 bool enabled() const { return m_enabled; } |
| 29 | 28 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 45 void idleFinished() override; | 44 void idleFinished() override; |
| 46 | 45 |
| 47 private: | 46 private: |
| 48 String16 nextProfileId(); | 47 String16 nextProfileId(); |
| 49 | 48 |
| 50 void startProfiling(const String16& title); | 49 void startProfiling(const String16& title); |
| 51 PassOwnPtr<protocol::Profiler::CPUProfile> stopProfiling(const String16& tit
le, bool serialize); | 50 PassOwnPtr<protocol::Profiler::CPUProfile> stopProfiling(const String16& tit
le, bool serialize); |
| 52 | 51 |
| 53 bool isRecording() const; | 52 bool isRecording() const; |
| 54 | 53 |
| 55 V8DebuggerImpl* m_debugger; | 54 V8InspectorSessionImpl* m_session; |
| 56 v8::Isolate* m_isolate; | 55 v8::Isolate* m_isolate; |
| 57 protocol::DictionaryValue* m_state; | 56 protocol::DictionaryValue* m_state; |
| 58 protocol::Frontend::Profiler* m_frontend; | 57 protocol::Frontend::Profiler* m_frontend; |
| 59 bool m_enabled; | 58 bool m_enabled; |
| 60 bool m_recordingCPUProfile; | 59 bool m_recordingCPUProfile; |
| 61 class ProfileDescriptor; | 60 class ProfileDescriptor; |
| 62 protocol::Vector<ProfileDescriptor> m_startedProfiles; | 61 protocol::Vector<ProfileDescriptor> m_startedProfiles; |
| 63 String16 m_frontendInitiatedProfileId; | 62 String16 m_frontendInitiatedProfileId; |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace blink | 65 } // namespace blink |
| 67 | 66 |
| 68 | 67 |
| 69 #endif // !defined(V8ProfilerAgentImpl_h) | 68 #endif // !defined(V8ProfilerAgentImpl_h) |
| OLD | NEW |