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

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 1638563002: DevTools: migrate ScriptFunctionCall off ScriptValue (to be inlined into the InjectedScript.cpp). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/platform/JSONValuesForV8.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 WebLocalFrameImpl* webLocalFrameImpl, 309 WebLocalFrameImpl* webLocalFrameImpl,
310 WebDevToolsAgentClient* client, 310 WebDevToolsAgentClient* client,
311 PassOwnPtrWillBeRawPtr<InspectorOverlay> overlay) 311 PassOwnPtrWillBeRawPtr<InspectorOverlay> overlay)
312 : m_client(client) 312 : m_client(client)
313 , m_webLocalFrameImpl(webLocalFrameImpl) 313 , m_webLocalFrameImpl(webLocalFrameImpl)
314 , m_attached(false) 314 , m_attached(false)
315 #if ENABLE(ASSERT) 315 #if ENABLE(ASSERT)
316 , m_hasBeenDisposed(false) 316 , m_hasBeenDisposed(false)
317 #endif 317 #endif
318 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents()) 318 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents())
319 , m_injectedScriptManager(InjectedScriptManager::createForPage())
320 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF rameImpl->frame())) 319 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF rameImpl->frame()))
321 , m_overlay(overlay) 320 , m_overlay(overlay)
322 , m_inspectedFrames(InspectedFrames::create(m_webLocalFrameImpl->frame())) 321 , m_inspectedFrames(InspectedFrames::create(m_webLocalFrameImpl->frame()))
323 , m_inspectorAgent(nullptr) 322 , m_inspectorAgent(nullptr)
324 , m_domAgent(nullptr) 323 , m_domAgent(nullptr)
325 , m_pageAgent(nullptr) 324 , m_pageAgent(nullptr)
326 , m_resourceAgent(nullptr) 325 , m_resourceAgent(nullptr)
327 , m_layerTreeAgent(nullptr) 326 , m_layerTreeAgent(nullptr)
328 , m_tracingAgent(nullptr) 327 , m_tracingAgent(nullptr)
329 , m_pageRuntimeAgent(nullptr) 328 , m_pageRuntimeAgent(nullptr)
330 , m_pageConsoleAgent(nullptr) 329 , m_pageConsoleAgent(nullptr)
331 , m_agents(m_instrumentingAgents.get()) 330 , m_agents(m_instrumentingAgents.get())
332 , m_deferredAgentsInitialized(false) 331 , m_deferredAgentsInitialized(false)
333 , m_sessionId(0) 332 , m_sessionId(0)
334 , m_stateMuted(false) 333 , m_stateMuted(false)
335 { 334 {
336 ASSERT(isMainThread()); 335 ASSERT(isMainThread());
337 ASSERT(m_webLocalFrameImpl->frame()); 336 ASSERT(m_webLocalFrameImpl->frame());
338 337
339 long processId = Platform::current()->getUniqueIdForProcess(); 338 long processId = Platform::current()->getUniqueIdForProcess();
340 ASSERT(processId > 0); 339 ASSERT(processId > 0);
341 IdentifiersFactory::setProcessId(processId); 340 IdentifiersFactory::setProcessId(processId);
341
342 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client);
343 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance();
344 m_injectedScriptManager = InjectedScriptManager::create(mainThreadDebugger);
342 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ; 345 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ;
343 346
344 OwnPtrWillBeRawPtr<InspectorInspectorAgent> inspectorAgentPtr(InspectorInspe ctorAgent::create(injectedScriptManager)); 347 OwnPtrWillBeRawPtr<InspectorInspectorAgent> inspectorAgentPtr(InspectorInspe ctorAgent::create(injectedScriptManager));
345 m_inspectorAgent = inspectorAgentPtr.get(); 348 m_inspectorAgent = inspectorAgentPtr.get();
346 m_agents.append(inspectorAgentPtr.release()); 349 m_agents.append(inspectorAgentPtr.release());
347 350
348 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_inspectedFrames.get(), injectedScriptManager, m_overlay.get())); 351 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_inspectedFrames.get(), injectedScriptManager, m_overlay.get()));
349 m_domAgent = domAgentPtr.get(); 352 m_domAgent = domAgentPtr.get();
350 m_agents.append(domAgentPtr.release()); 353 m_agents.append(domAgentPtr.release());
351 354
352 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_inspectedFrames.get())); 355 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_inspectedFrames.get()));
353 m_layerTreeAgent = layerTreeAgentPtr.get(); 356 m_layerTreeAgent = layerTreeAgentPtr.get();
354 m_agents.append(layerTreeAgentPtr.release()); 357 m_agents.append(layerTreeAgentPtr.release());
355 358
356 m_agents.append(InspectorTimelineAgent::create()); 359 m_agents.append(InspectorTimelineAgent::create());
357 360
358 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client);
359 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance();
360
361 OwnPtrWillBeRawPtr<PageRuntimeAgent> pageRuntimeAgentPtr(PageRuntimeAgent::c reate(injectedScriptManager, this, mainThreadDebugger->debugger(), m_inspectedFr ames.get())); 361 OwnPtrWillBeRawPtr<PageRuntimeAgent> pageRuntimeAgentPtr(PageRuntimeAgent::c reate(injectedScriptManager, this, mainThreadDebugger->debugger(), m_inspectedFr ames.get()));
362 m_pageRuntimeAgent = pageRuntimeAgentPtr.get(); 362 m_pageRuntimeAgent = pageRuntimeAgentPtr.get();
363 m_agents.append(pageRuntimeAgentPtr.release()); 363 m_agents.append(pageRuntimeAgentPtr.release());
364 364
365 OwnPtrWillBeRawPtr<PageConsoleAgent> pageConsoleAgentPtr = PageConsoleAgent: :create(injectedScriptManager, m_domAgent, m_inspectedFrames.get()); 365 OwnPtrWillBeRawPtr<PageConsoleAgent> pageConsoleAgentPtr = PageConsoleAgent: :create(injectedScriptManager, m_domAgent, m_inspectedFrames.get());
366 m_pageConsoleAgent = pageConsoleAgentPtr.get(); 366 m_pageConsoleAgent = pageConsoleAgentPtr.get();
367 367
368 OwnPtrWillBeRawPtr<InspectorWorkerAgent> workerAgentPtr = InspectorWorkerAge nt::create(pageConsoleAgentPtr.get()); 368 OwnPtrWillBeRawPtr<InspectorWorkerAgent> workerAgentPtr = InspectorWorkerAge nt::create(pageConsoleAgentPtr.get());
369 369
370 OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr = InspectorTracing Agent::create(this, workerAgentPtr.get(), m_inspectedFrames.get()); 370 OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr = InspectorTracing Agent::create(this, workerAgentPtr.get(), m_inspectedFrames.get());
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) 725 if (!InspectorBackendDispatcher::getCommandName(message, &commandName))
726 return false; 726 return false;
727 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd) 727 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd)
728 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd) 728 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd)
729 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd) 729 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd)
730 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 730 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
731 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 731 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
732 } 732 }
733 733
734 } // namespace blink 734 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/JSONValuesForV8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698