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

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

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win compile Created 4 years, 3 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 /* 1 /*
2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "platform/v8_inspector/V8InspectorImpl.h" 31 #include "platform/v8_inspector/V8InspectorImpl.h"
32 32
33 #include "platform/v8_inspector/InspectedContext.h" 33 #include "platform/v8_inspector/InspectedContext.h"
34 #include "platform/v8_inspector/StringUtil.h"
34 #include "platform/v8_inspector/V8Compat.h" 35 #include "platform/v8_inspector/V8Compat.h"
35 #include "platform/v8_inspector/V8ConsoleAgentImpl.h" 36 #include "platform/v8_inspector/V8ConsoleAgentImpl.h"
36 #include "platform/v8_inspector/V8ConsoleMessage.h" 37 #include "platform/v8_inspector/V8ConsoleMessage.h"
37 #include "platform/v8_inspector/V8Debugger.h" 38 #include "platform/v8_inspector/V8Debugger.h"
38 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 39 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
39 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 40 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
40 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" 41 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
41 #include "platform/v8_inspector/V8StackTraceImpl.h" 42 #include "platform/v8_inspector/V8StackTraceImpl.h"
42 #include "platform/v8_inspector/V8StringUtil.h" 43 #include "platform/v8_inspector/protocol/Protocol.h"
43 #include "platform/v8_inspector/public/V8InspectorClient.h" 44 #include "platform/v8_inspector/public/V8InspectorClient.h"
44 #include <v8-profiler.h> 45 #include <v8-profiler.h>
45 46
46 namespace v8_inspector { 47 namespace v8_inspector {
47 48
48 std::unique_ptr<V8Inspector> V8Inspector::create(v8::Isolate* isolate, V8Inspect orClient* client) 49 std::unique_ptr<V8Inspector> V8Inspector::create(v8::Isolate* isolate, V8Inspect orClient* client)
49 { 50 {
50 return wrapUnique(new V8InspectorImpl(isolate, client)); 51 return wrapUnique(new V8InspectorImpl(isolate, client));
51 } 52 }
52 53
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (storageIt == m_consoleStorageMap.end()) 160 if (storageIt == m_consoleStorageMap.end())
160 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first; 161 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first;
161 return storageIt->second.get(); 162 return storageIt->second.get();
162 } 163 }
163 164
164 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St ackTrace> stackTrace) 165 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St ackTrace> stackTrace)
165 { 166 {
166 return m_debugger->createStackTrace(stackTrace); 167 return m_debugger->createStackTrace(stackTrace);
167 } 168 }
168 169
169 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, protocol::FrontendChannel* channel, const StringView& state) 170 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, V8Inspector::Channel* channel, const StringView& state)
170 { 171 {
171 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend()); 172 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend());
172 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, channel, state); 173 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, channel, state);
173 m_sessions[contextGroupId] = session.get(); 174 m_sessions[contextGroupId] = session.get();
174 return std::move(session); 175 return std::move(session);
175 } 176 }
176 177
177 void V8InspectorImpl::disconnect(V8InspectorSessionImpl* session) 178 void V8InspectorImpl::disconnect(V8InspectorSessionImpl* session)
178 { 179 {
179 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end()); 180 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end());
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 342
342 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id) 343 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id)
343 { 344 {
344 if (!contextGroupId) 345 if (!contextGroupId)
345 return nullptr; 346 return nullptr;
346 SessionMap::iterator iter = m_sessions.find(contextGroupId); 347 SessionMap::iterator iter = m_sessions.find(contextGroupId);
347 return iter == m_sessions.end() ? nullptr : iter->second; 348 return iter == m_sessions.end() ? nullptr : iter->second;
348 } 349 }
349 350
350 } // namespace v8_inspector 351 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698