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

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

Issue 1967933002: [DevTools] Dispatch messages to V8InspectorSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1936593002
Patch Set: rebased Created 4 years, 7 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/Frontend.h" 10 #include "platform/inspector_protocol/Frontend.h"
10 #include "platform/inspector_protocol/String16.h" 11 #include "platform/inspector_protocol/String16.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 V8InspectorSessionImpl; 19 class V8InspectorSessionImpl;
20 20
21 class V8ProfilerAgentImpl : public V8ProfilerAgent { 21 class V8ProfilerAgentImpl : public protocol::Backend::Profiler {
22 PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl); 22 PROTOCOL_DISALLOW_COPY(V8ProfilerAgentImpl);
23 public: 23 public:
24 explicit V8ProfilerAgentImpl(V8InspectorSessionImpl*); 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 28 void restore();
29 void setInspectorState(protocol::DictionaryValue* state) override { m_state = state; }
30 void setFrontend(protocol::Frontend::Profiler* frontend) override { m_fronte nd = frontend; }
31 void clearFrontend() override;
32 void restore() override;
33 29
34 void enable(ErrorString*) override; 30 void enable(ErrorString*) override;
35 void disable(ErrorString*) override; 31 void disable(ErrorString*) override;
36 void setSamplingInterval(ErrorString*, int) override; 32 void setSamplingInterval(ErrorString*, int) override;
37 void start(ErrorString*) override; 33 void start(ErrorString*) override;
38 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override; 34 void stop(ErrorString*, OwnPtr<protocol::Profiler::CPUProfile>*) override;
39 35
40 void consoleProfile(const String16& title); 36 void consoleProfile(const String16& title);
41 void consoleProfileEnd(const String16& title); 37 void consoleProfileEnd(const String16& title);
42 38
(...skipping 13 matching lines...) Expand all
56 bool m_recordingCPUProfile; 52 bool m_recordingCPUProfile;
57 class ProfileDescriptor; 53 class ProfileDescriptor;
58 protocol::Vector<ProfileDescriptor> m_startedProfiles; 54 protocol::Vector<ProfileDescriptor> m_startedProfiles;
59 String16 m_frontendInitiatedProfileId; 55 String16 m_frontendInitiatedProfileId;
60 }; 56 };
61 57
62 } // namespace blink 58 } // namespace blink
63 59
64 60
65 #endif // !defined(V8ProfilerAgentImpl_h) 61 #endif // !defined(V8ProfilerAgentImpl_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698