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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "core/inspector/InspectorHeapProfilerAgent.h" | 46 #include "core/inspector/InspectorHeapProfilerAgent.h" |
47 #include "core/inspector/InspectorInputAgent.h" | 47 #include "core/inspector/InspectorInputAgent.h" |
48 #include "core/inspector/InspectorInstrumentation.h" | 48 #include "core/inspector/InspectorInstrumentation.h" |
49 #include "core/inspector/InspectorLayerTreeAgent.h" | 49 #include "core/inspector/InspectorLayerTreeAgent.h" |
50 #include "core/inspector/InspectorMemoryAgent.h" | 50 #include "core/inspector/InspectorMemoryAgent.h" |
51 #include "core/inspector/InspectorPageAgent.h" | 51 #include "core/inspector/InspectorPageAgent.h" |
52 #include "core/inspector/InspectorProfilerAgent.h" | 52 #include "core/inspector/InspectorProfilerAgent.h" |
53 #include "core/inspector/InspectorResourceAgent.h" | 53 #include "core/inspector/InspectorResourceAgent.h" |
54 #include "core/inspector/InspectorResourceContainer.h" | 54 #include "core/inspector/InspectorResourceContainer.h" |
55 #include "core/inspector/InspectorResourceContentLoader.h" | 55 #include "core/inspector/InspectorResourceContentLoader.h" |
| 56 #include "core/inspector/InspectorRuntimeAgent.h" |
56 #include "core/inspector/InspectorTaskRunner.h" | 57 #include "core/inspector/InspectorTaskRunner.h" |
57 #include "core/inspector/InspectorTracingAgent.h" | 58 #include "core/inspector/InspectorTracingAgent.h" |
58 #include "core/inspector/InspectorWorkerAgent.h" | 59 #include "core/inspector/InspectorWorkerAgent.h" |
59 #include "core/inspector/LayoutEditor.h" | 60 #include "core/inspector/LayoutEditor.h" |
60 #include "core/inspector/MainThreadDebugger.h" | 61 #include "core/inspector/MainThreadDebugger.h" |
61 #include "core/inspector/PageConsoleAgent.h" | 62 #include "core/inspector/PageConsoleAgent.h" |
62 #include "core/inspector/PageDebuggerAgent.h" | |
63 #include "core/inspector/PageRuntimeAgent.h" | |
64 #include "core/layout/api/LayoutViewItem.h" | 63 #include "core/layout/api/LayoutViewItem.h" |
65 #include "core/page/FocusController.h" | 64 #include "core/page/FocusController.h" |
66 #include "core/page/Page.h" | 65 #include "core/page/Page.h" |
67 #include "modules/accessibility/InspectorAccessibilityAgent.h" | 66 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
68 #include "modules/cachestorage/InspectorCacheStorageAgent.h" | 67 #include "modules/cachestorage/InspectorCacheStorageAgent.h" |
69 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 68 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
70 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 69 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
71 #include "modules/storage/InspectorDOMStorageAgent.h" | 70 #include "modules/storage/InspectorDOMStorageAgent.h" |
72 #include "modules/webdatabase/InspectorDatabaseAgent.h" | 71 #include "modules/webdatabase/InspectorDatabaseAgent.h" |
73 #include "platform/RuntimeEnabledFeatures.h" | 72 #include "platform/RuntimeEnabledFeatures.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 376 |
378 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId
) | 377 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId
) |
379 { | 378 { |
380 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument
ingAgents.get(), sessionId, false /* autoFlush */); | 379 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument
ingAgents.get(), sessionId, false /* autoFlush */); |
381 | 380 |
382 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client); | 381 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client); |
383 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance(); | 382 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance(); |
384 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); | 383 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); |
385 m_v8Session = mainThreadDebugger->debugger()->connect(mainThreadDebugger->co
ntextGroupId(m_inspectedFrames->root())); | 384 m_v8Session = mainThreadDebugger->debugger()->connect(mainThreadDebugger->co
ntextGroupId(m_inspectedFrames->root())); |
386 | 385 |
387 m_session->append(PageRuntimeAgent::create(m_v8Session->runtimeAgent(), m_in
spectedFrames.get())); | 386 m_session->append(new InspectorRuntimeAgent(m_v8Session->runtimeAgent())); |
388 | 387 |
389 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram
es.get(), m_v8Session.get(), m_overlay.get()); | 388 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram
es.get(), m_v8Session.get(), m_overlay.get()); |
390 m_domAgent = domAgent; | 389 m_domAgent = domAgent; |
391 m_session->append(domAgent); | 390 m_session->append(domAgent); |
392 | 391 |
393 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); | 392 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); |
394 m_layerTreeAgent = layerTreeAgent; | 393 m_layerTreeAgent = layerTreeAgent; |
395 m_session->append(layerTreeAgent); | 394 m_session->append(layerTreeAgent); |
396 | 395 |
397 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins
pectedFrames.get()); | 396 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins
pectedFrames.get()); |
398 m_resourceAgent = resourceAgent; | 397 m_resourceAgent = resourceAgent; |
399 m_session->append(resourceAgent); | 398 m_session->append(resourceAgent); |
400 | 399 |
401 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta
iner.get()); | 400 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta
iner.get()); |
402 m_session->append(cssAgent); | 401 m_session->append(cssAgent); |
403 | 402 |
404 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom
Agent, cssAgent, m_v8Session.get())); | 403 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom
Agent, cssAgent, m_v8Session.get())); |
405 | 404 |
406 m_session->append(InspectorMemoryAgent::create()); | 405 m_session->append(InspectorMemoryAgent::create()); |
407 | 406 |
408 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g
et())); | 407 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g
et())); |
409 | 408 |
410 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get())); | 409 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get())); |
411 | 410 |
412 InspectorDebuggerAgent* debuggerAgent = PageDebuggerAgent::create(m_v8Sessio
n->debuggerAgent(), m_inspectedFrames.get()); | 411 InspectorDebuggerAgent* debuggerAgent = new InspectorDebuggerAgent(m_v8Sessi
on->debuggerAgent()); |
413 m_session->append(debuggerAgent); | 412 m_session->append(debuggerAgent); |
414 | 413 |
415 PageConsoleAgent* pageConsoleAgent = new PageConsoleAgent(m_v8Session.get(),
m_domAgent, m_inspectedFrames.get()); | 414 PageConsoleAgent* pageConsoleAgent = new PageConsoleAgent(m_v8Session.get(),
m_domAgent, m_inspectedFrames.get()); |
416 m_session->append(pageConsoleAgent); | 415 m_session->append(pageConsoleAgent); |
417 | 416 |
418 InspectorWorkerAgent* workerAgent = InspectorWorkerAgent::create(m_inspected
Frames.get(), pageConsoleAgent); | 417 InspectorWorkerAgent* workerAgent = InspectorWorkerAgent::create(m_inspected
Frames.get(), pageConsoleAgent); |
419 m_session->append(workerAgent); | 418 m_session->append(workerAgent); |
420 | 419 |
421 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo
rkerAgent, m_inspectedFrames.get()); | 420 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo
rkerAgent, m_inspectedFrames.get()); |
422 m_tracingAgent = tracingAgent; | 421 m_tracingAgent = tracingAgent; |
423 m_session->append(tracingAgent); | 422 m_session->append(tracingAgent); |
424 | 423 |
425 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, m_v8Ses
sion.get())); | 424 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, m_v8Ses
sion.get())); |
426 | 425 |
427 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get())); | 426 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get())); |
428 | 427 |
429 m_session->append(new InspectorProfilerAgent(m_v8Session->profilerAgent())); | 428 m_session->append(new InspectorProfilerAgent(m_v8Session->profilerAgent())); |
430 | 429 |
431 m_session->append(InspectorHeapProfilerAgent::create(m_v8Session->heapProfil
erAgent())); | 430 m_session->append(new InspectorHeapProfilerAgent(m_v8Session->heapProfilerAg
ent())); |
432 | 431 |
433 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames
.get(), this, m_resourceContentLoader.get(), m_v8Session.get()); | 432 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames
.get(), this, m_resourceContentLoader.get(), m_v8Session.get()); |
434 m_pageAgent = pageAgent; | 433 m_pageAgent = pageAgent; |
435 m_session->append(pageAgent); | 434 m_session->append(pageAgent); |
436 | 435 |
437 m_tracingAgent->setLayerTreeId(m_layerTreeId); | 436 m_tracingAgent->setLayerTreeId(m_layerTreeId); |
438 m_resourceAgent->setHostId(hostId); | 437 m_resourceAgent->setHostId(hostId); |
439 | 438 |
440 if (m_includeViewAgents) { | 439 if (m_includeViewAgents) { |
441 // TODO(dgozman): we should actually pass the view instead of frame, but
during | 440 // TODO(dgozman): we should actually pass the view instead of frame, but
during |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) | 691 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) |
693 { | 692 { |
694 return method == "Debugger.pause" | 693 return method == "Debugger.pause" |
695 || method == "Debugger.setBreakpoint" | 694 || method == "Debugger.setBreakpoint" |
696 || method == "Debugger.setBreakpointByUrl" | 695 || method == "Debugger.setBreakpointByUrl" |
697 || method == "Debugger.removeBreakpoint" | 696 || method == "Debugger.removeBreakpoint" |
698 || method == "Debugger.setBreakpointsActive"; | 697 || method == "Debugger.setBreakpointsActive"; |
699 } | 698 } |
700 | 699 |
701 } // namespace blink | 700 } // namespace blink |
OLD | NEW |