| 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 "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/InspectorFrontend.h" | 9 #include "core/InspectorFrontend.h" |
| 10 #include "core/inspector/v8/V8ProfilerAgent.h" | 10 #include "core/inspector/v8/V8ProfilerAgent.h" |
| 11 #include "platform/heap/Handle.h" |
| 11 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
| 12 #include "wtf/Noncopyable.h" | 13 #include "wtf/Noncopyable.h" |
| 13 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class CORE_EXPORT V8ProfilerAgentImpl : public V8ProfilerAgent { | 18 class CORE_EXPORT V8ProfilerAgentImpl : public V8ProfilerAgent { |
| 18 WTF_MAKE_NONCOPYABLE(V8ProfilerAgentImpl); | 19 WTF_MAKE_NONCOPYABLE(V8ProfilerAgentImpl); |
| 19 public: | 20 public: |
| 20 explicit V8ProfilerAgentImpl(v8::Isolate*); | 21 explicit V8ProfilerAgentImpl(v8::Isolate*); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 private: | 41 private: |
| 41 void stop(ErrorString*, RefPtr<TypeBuilder::Profiler::CPUProfile>*); | 42 void stop(ErrorString*, RefPtr<TypeBuilder::Profiler::CPUProfile>*); |
| 42 String nextProfileId(); | 43 String nextProfileId(); |
| 43 | 44 |
| 44 void startProfiling(const String& title); | 45 void startProfiling(const String& title); |
| 45 PassRefPtr<TypeBuilder::Profiler::CPUProfile> stopProfiling(const String& ti
tle, bool serialize); | 46 PassRefPtr<TypeBuilder::Profiler::CPUProfile> stopProfiling(const String& ti
tle, bool serialize); |
| 46 | 47 |
| 47 bool isRecording() const; | 48 bool isRecording() const; |
| 48 | 49 |
| 49 v8::Isolate* m_isolate; | 50 v8::Isolate* m_isolate; |
| 50 InspectorState* m_state; | 51 RawPtrWillBeWeakPersistent<InspectorState> m_state; |
| 51 InspectorFrontend::Profiler* m_frontend; | 52 InspectorFrontend::Profiler* m_frontend; |
| 52 bool m_enabled; | 53 bool m_enabled; |
| 53 bool m_recordingCPUProfile; | 54 bool m_recordingCPUProfile; |
| 54 class ProfileDescriptor; | 55 class ProfileDescriptor; |
| 55 Vector<ProfileDescriptor> m_startedProfiles; | 56 Vector<ProfileDescriptor> m_startedProfiles; |
| 56 String m_frontendInitiatedProfileId; | 57 String m_frontendInitiatedProfileId; |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace blink | 60 } // namespace blink |
| 60 | 61 |
| 61 | 62 |
| 62 #endif // !defined(V8ProfilerAgentImpl_h) | 63 #endif // !defined(V8ProfilerAgentImpl_h) |
| OLD | NEW |