OLD | NEW |
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 m_resourceContentLoader->dispose(); | 375 m_resourceContentLoader->dispose(); |
376 } | 376 } |
377 | 377 |
378 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId
) | 378 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId
) |
379 { | 379 { |
380 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument
ingAgents.get(), sessionId, false /* autoFlush */); | 380 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument
ingAgents.get(), sessionId, false /* autoFlush */); |
381 | 381 |
382 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client); | 382 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client); |
383 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance(); | 383 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance(); |
384 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); | 384 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); |
| 385 m_v8Session = mainThreadDebugger->debugger()->connect(mainThreadDebugger->co
ntextGroupId(m_inspectedFrames->root())); |
385 | 386 |
386 m_v8Session = mainThreadDebugger->debugger()->connect(mainThreadDebugger->co
ntextGroupId(m_inspectedFrames->root())); | 387 m_session->append(PageRuntimeAgent::create(this, m_v8Session->runtimeAgent()
, m_inspectedFrames.get())); |
387 V8RuntimeAgent* runtimeAgent = m_v8Session->runtimeAgent(); | |
388 | 388 |
389 m_session->append(PageRuntimeAgent::create(this, runtimeAgent, m_inspectedFr
ames.get())); | 389 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram
es.get(), m_v8Session.get(), m_overlay.get()); |
390 | |
391 InspectorDOMAgent* domAgent = InspectorDOMAgent::create(isolate, m_inspected
Frames.get(), runtimeAgent, m_overlay.get()); | |
392 m_domAgent = domAgent; | 390 m_domAgent = domAgent; |
393 m_session->append(domAgent); | 391 m_session->append(domAgent); |
394 | 392 |
395 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); | 393 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); |
396 m_layerTreeAgent = layerTreeAgent; | 394 m_layerTreeAgent = layerTreeAgent; |
397 m_session->append(layerTreeAgent); | 395 m_session->append(layerTreeAgent); |
398 | 396 |
399 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins
pectedFrames.get()); | 397 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins
pectedFrames.get()); |
400 m_resourceAgent = resourceAgent; | 398 m_resourceAgent = resourceAgent; |
401 m_session->append(resourceAgent); | 399 m_session->append(resourceAgent); |
402 | 400 |
403 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta
iner.get()); | 401 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta
iner.get()); |
404 m_session->append(cssAgent); | 402 m_session->append(cssAgent); |
405 | 403 |
406 m_session->append(InspectorAnimationAgent::create(m_inspectedFrames.get(), m
_domAgent, cssAgent, runtimeAgent)); | 404 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom
Agent, cssAgent, m_v8Session.get())); |
407 | 405 |
408 m_session->append(InspectorMemoryAgent::create()); | 406 m_session->append(InspectorMemoryAgent::create()); |
409 | 407 |
410 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g
et())); | 408 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g
et())); |
411 | 409 |
412 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get())); | 410 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get())); |
413 | 411 |
414 InspectorDebuggerAgent* debuggerAgent = PageDebuggerAgent::create(m_v8Sessio
n->debuggerAgent(), m_inspectedFrames.get()); | 412 InspectorDebuggerAgent* debuggerAgent = PageDebuggerAgent::create(m_v8Sessio
n->debuggerAgent(), m_inspectedFrames.get()); |
415 m_session->append(debuggerAgent); | 413 m_session->append(debuggerAgent); |
416 | 414 |
417 PageConsoleAgent* pageConsoleAgent = PageConsoleAgent::create(runtimeAgent,
m_domAgent, m_inspectedFrames.get()); | 415 PageConsoleAgent* pageConsoleAgent = new PageConsoleAgent(m_v8Session.get(),
m_domAgent, m_inspectedFrames.get()); |
418 m_session->append(pageConsoleAgent); | 416 m_session->append(pageConsoleAgent); |
419 | 417 |
420 InspectorWorkerAgent* workerAgent = InspectorWorkerAgent::create(m_inspected
Frames.get(), pageConsoleAgent); | 418 InspectorWorkerAgent* workerAgent = InspectorWorkerAgent::create(m_inspected
Frames.get(), pageConsoleAgent); |
421 m_session->append(workerAgent); | 419 m_session->append(workerAgent); |
422 | 420 |
423 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo
rkerAgent, m_inspectedFrames.get()); | 421 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo
rkerAgent, m_inspectedFrames.get()); |
424 m_tracingAgent = tracingAgent; | 422 m_tracingAgent = tracingAgent; |
425 m_session->append(tracingAgent); | 423 m_session->append(tracingAgent); |
426 | 424 |
427 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, runtime
Agent, m_v8Session.get())); | 425 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, m_v8Ses
sion.get())); |
428 | 426 |
429 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get())); | 427 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get())); |
430 | 428 |
431 m_session->append(InspectorProfilerAgent::create(m_v8Session->profilerAgent(
), m_overlay.get())); | 429 m_session->append(InspectorProfilerAgent::create(m_v8Session->profilerAgent(
), m_overlay.get())); |
432 | 430 |
433 m_session->append(InspectorHeapProfilerAgent::create(m_v8Session->heapProfil
erAgent())); | 431 m_session->append(InspectorHeapProfilerAgent::create(m_v8Session->heapProfil
erAgent())); |
434 | 432 |
435 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames
.get(), this, m_resourceContentLoader.get(), m_v8Session.get()); | 433 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames
.get(), this, m_resourceContentLoader.get(), m_v8Session.get()); |
436 m_pageAgent = pageAgent; | 434 m_pageAgent = pageAgent; |
437 m_session->append(pageAgent); | 435 m_session->append(pageAgent); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 if (!protocol::Dispatcher::getCommandName(message, &commandName)) | 683 if (!protocol::Dispatcher::getCommandName(message, &commandName)) |
686 return false; | 684 return false; |
687 return commandName == "Debugger.pause" | 685 return commandName == "Debugger.pause" |
688 || commandName == "Debugger.setBreakpoint" | 686 || commandName == "Debugger.setBreakpoint" |
689 || commandName == "Debugger.setBreakpointByUrl" | 687 || commandName == "Debugger.setBreakpointByUrl" |
690 || commandName == "Debugger.removeBreakpoint" | 688 || commandName == "Debugger.removeBreakpoint" |
691 || commandName == "Debugger.setBreakpointsActive"; | 689 || commandName == "Debugger.setBreakpointsActive"; |
692 } | 690 } |
693 | 691 |
694 } // namespace blink | 692 } // namespace blink |
OLD | NEW |