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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp

Issue 2008183002: DevTools: generate frontend and backend interfaces under domains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed 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 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 "platform/v8_inspector/V8InspectorSessionImpl.h" 5 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
6 6
7 #include "platform/inspector_protocol/Parser.h" 7 #include "platform/inspector_protocol/Parser.h"
8 #include "platform/v8_inspector/InjectedScript.h" 8 #include "platform/v8_inspector/InjectedScript.h"
9 #include "platform/v8_inspector/InspectedContext.h" 9 #include "platform/v8_inspector/InspectedContext.h"
10 #include "platform/v8_inspector/RemoteObjectId.h" 10 #include "platform/v8_inspector/RemoteObjectId.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (savedState) { 48 if (savedState) {
49 std::unique_ptr<protocol::Value> state = protocol::parseJSON(*savedState ); 49 std::unique_ptr<protocol::Value> state = protocol::parseJSON(*savedState );
50 if (state) 50 if (state)
51 m_state = protocol::DictionaryValue::cast(std::move(state)); 51 m_state = protocol::DictionaryValue::cast(std::move(state));
52 if (!m_state) 52 if (!m_state)
53 m_state = protocol::DictionaryValue::create(); 53 m_state = protocol::DictionaryValue::create();
54 } else { 54 } else {
55 m_state = protocol::DictionaryValue::create(); 55 m_state = protocol::DictionaryValue::create();
56 } 56 }
57 57
58 m_runtimeAgent = wrapUnique(new V8RuntimeAgentImpl(this, protocol::Frontend: :Runtime::from(m_frontend.get()), agentState("Runtime"))); 58 m_runtimeAgent = wrapUnique(new V8RuntimeAgentImpl(this, protocol::Runtime:: Frontend::from(m_frontend.get()), agentState("Runtime")));
59 m_dispatcher->registerAgent(static_cast<protocol::Backend::Runtime*>(m_runti meAgent.get())); 59 m_dispatcher->registerAgent(static_cast<protocol::Runtime::Backend*>(m_runti meAgent.get()));
60 60
61 m_debuggerAgent = wrapUnique(new V8DebuggerAgentImpl(this, protocol::Fronten d::Debugger::from(m_frontend.get()), agentState("Debugger"))); 61 m_debuggerAgent = wrapUnique(new V8DebuggerAgentImpl(this, protocol::Debugge r::Frontend::from(m_frontend.get()), agentState("Debugger")));
62 m_dispatcher->registerAgent(static_cast<protocol::Backend::Debugger*>(m_debu ggerAgent.get())); 62 m_dispatcher->registerAgent(static_cast<protocol::Debugger::Backend*>(m_debu ggerAgent.get()));
63 63
64 m_heapProfilerAgent = wrapUnique(new V8HeapProfilerAgentImpl(this, protocol: :Frontend::HeapProfiler::from(m_frontend.get()), agentState("HeapProfiler"))); 64 m_heapProfilerAgent = wrapUnique(new V8HeapProfilerAgentImpl(this, protocol: :HeapProfiler::Frontend::from(m_frontend.get()), agentState("HeapProfiler")));
65 m_dispatcher->registerAgent(static_cast<protocol::Backend::HeapProfiler*>(m_ heapProfilerAgent.get())); 65 m_dispatcher->registerAgent(static_cast<protocol::HeapProfiler::Backend*>(m_ heapProfilerAgent.get()));
66 66
67 m_profilerAgent = wrapUnique(new V8ProfilerAgentImpl(this, protocol::Fronten d::Profiler::from(m_frontend.get()), agentState("Profiler"))); 67 m_profilerAgent = wrapUnique(new V8ProfilerAgentImpl(this, protocol::Profile r::Frontend::from(m_frontend.get()), agentState("Profiler")));
68 m_dispatcher->registerAgent(static_cast<protocol::Backend::Profiler*>(m_prof ilerAgent.get())); 68 m_dispatcher->registerAgent(static_cast<protocol::Profiler::Backend*>(m_prof ilerAgent.get()));
69 69
70 if (savedState) { 70 if (savedState) {
71 m_runtimeAgent->restore(); 71 m_runtimeAgent->restore();
72 m_debuggerAgent->restore(); 72 m_debuggerAgent->restore();
73 m_heapProfilerAgent->restore(); 73 m_heapProfilerAgent->restore();
74 m_profilerAgent->restore(); 74 m_profilerAgent->restore();
75 } 75 }
76 } 76 }
77 77
78 V8InspectorSessionImpl::~V8InspectorSessionImpl() 78 V8InspectorSessionImpl::~V8InspectorSessionImpl()
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 { 326 {
327 m_debuggerAgent->asyncTaskFinished(task); 327 m_debuggerAgent->asyncTaskFinished(task);
328 } 328 }
329 329
330 void V8InspectorSessionImpl::allAsyncTasksCanceled() 330 void V8InspectorSessionImpl::allAsyncTasksCanceled()
331 { 331 {
332 m_debuggerAgent->allAsyncTasksCanceled(); 332 m_debuggerAgent->allAsyncTasksCanceled();
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698