Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.h

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/Backend.h" 9 #include "platform/inspector_protocol/Backend.h"
10 #include "platform/inspector_protocol/Frontend.h" 10 #include "platform/inspector_protocol/Frontend.h"
(...skipping 13 matching lines...) Expand all
24 V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::Frontend::Profiler*, protocol::DictionaryValue* state); 24 V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::Frontend::Profiler*, protocol::DictionaryValue* state);
25 ~V8ProfilerAgentImpl() override; 25 ~V8ProfilerAgentImpl() override;
26 26
27 bool enabled() const { return m_enabled; } 27 bool enabled() const { return m_enabled; }
28 void restore(); 28 void restore();
29 29
30 void enable(ErrorString*) override; 30 void enable(ErrorString*) override;
31 void disable(ErrorString*) override; 31 void disable(ErrorString*) override;
32 void setSamplingInterval(ErrorString*, int) override; 32 void setSamplingInterval(ErrorString*, int) override;
33 void start(ErrorString*) override; 33 void start(ErrorString*) override;
34 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override; 34 void stop(ErrorString*, std::unique_ptr<protocol::Profiler::CPUProfile>*) ov erride;
35 35
36 void consoleProfile(const String16& title); 36 void consoleProfile(const String16& title);
37 void consoleProfileEnd(const String16& title); 37 void consoleProfileEnd(const String16& title);
38 38
39 private: 39 private:
40 String16 nextProfileId(); 40 String16 nextProfileId();
41 41
42 void startProfiling(const String16& title); 42 void startProfiling(const String16& title);
43 PassOwnPtr<protocol::Profiler::CPUProfile> stopProfiling(const String16& tit le, bool serialize); 43 std::unique_ptr<protocol::Profiler::CPUProfile> stopProfiling(const String16 & title, bool serialize);
44 44
45 bool isRecording() const; 45 bool isRecording() const;
46 46
47 V8InspectorSessionImpl* m_session; 47 V8InspectorSessionImpl* m_session;
48 v8::Isolate* m_isolate; 48 v8::Isolate* m_isolate;
49 protocol::DictionaryValue* m_state; 49 protocol::DictionaryValue* m_state;
50 protocol::Frontend::Profiler* m_frontend; 50 protocol::Frontend::Profiler* m_frontend;
51 bool m_enabled; 51 bool m_enabled;
52 bool m_recordingCPUProfile; 52 bool m_recordingCPUProfile;
53 class ProfileDescriptor; 53 class ProfileDescriptor;
54 protocol::Vector<ProfileDescriptor> m_startedProfiles; 54 protocol::Vector<ProfileDescriptor> m_startedProfiles;
55 String16 m_frontendInitiatedProfileId; 55 String16 m_frontendInitiatedProfileId;
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 60
61 #endif // !defined(V8ProfilerAgentImpl_h) 61 #endif // !defined(V8ProfilerAgentImpl_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698