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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorSession.cpp

Issue 2760363002: [instrumentation] Generalize instrumentation to be used beyond the core layer (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "core/inspector/InspectorSession.h" 5 #include "core/inspector/InspectorSession.h"
6 6
7 #include "bindings/core/v8/ScriptController.h" 7 #include "bindings/core/v8/ScriptController.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/UseCounter.h" 9 #include "core/frame/UseCounter.h"
10 #include "core/inspector/InspectorBaseAgent.h" 10 #include "core/inspector/InspectorBaseAgent.h"
11 #include "core/inspector/InspectorInstrumentation.h" 11 #include "core/inspector/InspectorInstrumentation.h"
12 #include "core/inspector/V8InspectorString.h" 12 #include "core/inspector/V8InspectorString.h"
13 #include "core/inspector/protocol/Protocol.h" 13 #include "core/inspector/protocol/Protocol.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 namespace { 17 namespace {
18 const char kV8StateKey[] = "v8"; 18 const char kV8StateKey[] = "v8";
19 } 19 }
20 20
21 InspectorSession::InspectorSession(Client* client, 21 InspectorSession::InspectorSession(
22 InstrumentingAgents* instrumentingAgents, 22 Client* client,
23 int sessionId, 23 InspectorInstrumentationAgents* instrumentingAgents,
24 v8_inspector::V8Inspector* inspector, 24 int sessionId,
25 int contextGroupId, 25 v8_inspector::V8Inspector* inspector,
26 const String* savedState) 26 int contextGroupId,
27 const String* savedState)
27 : m_client(client), 28 : m_client(client),
28 m_v8Session(nullptr), 29 m_v8Session(nullptr),
29 m_sessionId(sessionId), 30 m_sessionId(sessionId),
30 m_disposed(false), 31 m_disposed(false),
31 m_instrumentingAgents(instrumentingAgents), 32 m_instrumentingAgents(instrumentingAgents),
32 m_inspectorBackendDispatcher(new protocol::UberDispatcher(this)) { 33 m_inspectorBackendDispatcher(new protocol::UberDispatcher(this)) {
33 if (savedState) { 34 if (savedState) {
34 std::unique_ptr<protocol::Value> state = 35 std::unique_ptr<protocol::Value> state =
35 protocol::StringUtil::parseJSON(*savedState); 36 protocol::StringUtil::parseJSON(*savedState);
36 if (state) 37 if (state)
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 185 }
185 m_notificationQueue.clear(); 186 m_notificationQueue.clear();
186 } 187 }
187 188
188 DEFINE_TRACE(InspectorSession) { 189 DEFINE_TRACE(InspectorSession) {
189 visitor->trace(m_instrumentingAgents); 190 visitor->trace(m_instrumentingAgents);
190 visitor->trace(m_agents); 191 visitor->trace(m_agents);
191 } 192 }
192 193
193 } // namespace blink 194 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698