| 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 30 matching lines...) Expand all Loading... |
| 41 #include "core/inspector/InspectorAnimationAgent.h" | 41 #include "core/inspector/InspectorAnimationAgent.h" |
| 42 #include "core/inspector/InspectorApplicationCacheAgent.h" | 42 #include "core/inspector/InspectorApplicationCacheAgent.h" |
| 43 #include "core/inspector/InspectorCSSAgent.h" | 43 #include "core/inspector/InspectorCSSAgent.h" |
| 44 #include "core/inspector/InspectorDOMAgent.h" | 44 #include "core/inspector/InspectorDOMAgent.h" |
| 45 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 45 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
| 46 #include "core/inspector/InspectorInputAgent.h" | 46 #include "core/inspector/InspectorInputAgent.h" |
| 47 #include "core/inspector/InspectorInstrumentation.h" | 47 #include "core/inspector/InspectorInstrumentation.h" |
| 48 #include "core/inspector/InspectorLayerTreeAgent.h" | 48 #include "core/inspector/InspectorLayerTreeAgent.h" |
| 49 #include "core/inspector/InspectorLogAgent.h" | 49 #include "core/inspector/InspectorLogAgent.h" |
| 50 #include "core/inspector/InspectorMemoryAgent.h" | 50 #include "core/inspector/InspectorMemoryAgent.h" |
| 51 #include "core/inspector/InspectorNetworkAgent.h" | |
| 52 #include "core/inspector/InspectorPageAgent.h" | 51 #include "core/inspector/InspectorPageAgent.h" |
| 53 #include "core/inspector/InspectorResourceContainer.h" | 52 #include "core/inspector/InspectorResourceContainer.h" |
| 54 #include "core/inspector/InspectorResourceContentLoader.h" | 53 #include "core/inspector/InspectorResourceContentLoader.h" |
| 55 #include "core/inspector/InspectorTaskRunner.h" | 54 #include "core/inspector/InspectorTaskRunner.h" |
| 56 #include "core/inspector/InspectorTracingAgent.h" | 55 #include "core/inspector/InspectorTracingAgent.h" |
| 57 #include "core/inspector/InspectorWorkerAgent.h" | 56 #include "core/inspector/InspectorWorkerAgent.h" |
| 58 #include "core/inspector/LayoutEditor.h" | 57 #include "core/inspector/LayoutEditor.h" |
| 59 #include "core/inspector/MainThreadDebugger.h" | 58 #include "core/inspector/MainThreadDebugger.h" |
| 60 #include "core/layout/api/LayoutViewItem.h" | 59 #include "core/layout/api/LayoutViewItem.h" |
| 61 #include "core/page/FocusController.h" | 60 #include "core/page/FocusController.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 m_session = new InspectorSession(this, m_instrumentingAgents.get(), sessionI
d, mainThreadDebugger->v8Inspector(), mainThreadDebugger->contextGroupId(m_inspe
ctedFrames->root()), state); | 380 m_session = new InspectorSession(this, m_instrumentingAgents.get(), sessionI
d, mainThreadDebugger->v8Inspector(), mainThreadDebugger->contextGroupId(m_inspe
ctedFrames->root()), state); |
| 382 | 381 |
| 383 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram
es.get(), m_session->v8Session(), m_overlay.get()); | 382 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram
es.get(), m_session->v8Session(), m_overlay.get()); |
| 384 m_domAgent = domAgent; | 383 m_domAgent = domAgent; |
| 385 m_session->append(domAgent); | 384 m_session->append(domAgent); |
| 386 | 385 |
| 387 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); | 386 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_
inspectedFrames.get()); |
| 388 m_layerTreeAgent = layerTreeAgent; | 387 m_layerTreeAgent = layerTreeAgent; |
| 389 m_session->append(layerTreeAgent); | 388 m_session->append(layerTreeAgent); |
| 390 | 389 |
| 391 InspectorNetworkAgent* networkAgent = InspectorNetworkAgent::create(m_inspec
tedFrames.get()); | 390 InspectorNetworkAgent* networkAgent = InspectorNetworkAgent::create(this, m_
inspectedFrames.get()); |
| 392 m_networkAgent = networkAgent; | 391 m_networkAgent = networkAgent; |
| 393 m_session->append(networkAgent); | 392 m_session->append(networkAgent); |
| 394 | 393 |
| 395 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_networkAgent, m_resourceContentLoader.get(), m_resourceContai
ner.get()); | 394 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec
tedFrames.get(), m_networkAgent, m_resourceContentLoader.get(), m_resourceContai
ner.get()); |
| 396 m_session->append(cssAgent); | 395 m_session->append(cssAgent); |
| 397 | 396 |
| 398 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom
Agent, cssAgent, m_session->v8Session())); | 397 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom
Agent, cssAgent, m_session->v8Session())); |
| 399 | 398 |
| 400 m_session->append(InspectorMemoryAgent::create()); | 399 m_session->append(InspectorMemoryAgent::create()); |
| 401 | 400 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 m_resourceContainer->didCommitLoadForLocalFrame(frame); | 493 m_resourceContainer->didCommitLoadForLocalFrame(frame); |
| 495 m_resourceContentLoader->didCommitLoadForLocalFrame(frame); | 494 m_resourceContentLoader->didCommitLoadForLocalFrame(frame); |
| 496 if (m_session) | 495 if (m_session) |
| 497 m_session->didCommitLoadForLocalFrame(frame); | 496 m_session->didCommitLoadForLocalFrame(frame); |
| 498 } | 497 } |
| 499 | 498 |
| 500 void WebDevToolsAgentImpl::didStartProvisionalLoad(LocalFrame* frame) | 499 void WebDevToolsAgentImpl::didStartProvisionalLoad(LocalFrame* frame) |
| 501 { | 500 { |
| 502 if (m_session && m_inspectedFrames->root() == frame) | 501 if (m_session && m_inspectedFrames->root() == frame) |
| 503 m_session->v8Session()->resume(); | 502 m_session->v8Session()->resume(); |
| 503 if (m_networkAgent) |
| 504 m_networkAgent->didStartProvisionalLoad(); |
| 504 } | 505 } |
| 505 | 506 |
| 506 bool WebDevToolsAgentImpl::screencastEnabled() | 507 bool WebDevToolsAgentImpl::screencastEnabled() |
| 507 { | 508 { |
| 508 return m_pageAgent && m_pageAgent->screencastEnabled(); | 509 return m_pageAgent && m_pageAgent->screencastEnabled(); |
| 509 } | 510 } |
| 510 | 511 |
| 511 void WebDevToolsAgentImpl::willAddPageOverlay(const GraphicsLayer* layer) | 512 void WebDevToolsAgentImpl::willAddPageOverlay(const GraphicsLayer* layer) |
| 512 { | 513 { |
| 513 if (m_layerTreeAgent) | 514 if (m_layerTreeAgent) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 if (m_overlay) | 557 if (m_overlay) |
| 557 m_overlay->hideReloadingBlanket(); | 558 m_overlay->hideReloadingBlanket(); |
| 558 } | 559 } |
| 559 | 560 |
| 560 void WebDevToolsAgentImpl::setCPUThrottlingRate(double rate) | 561 void WebDevToolsAgentImpl::setCPUThrottlingRate(double rate) |
| 561 { | 562 { |
| 562 if (m_client) | 563 if (m_client) |
| 563 m_client->setCPUThrottlingRate(rate); | 564 m_client->setCPUThrottlingRate(rate); |
| 564 } | 565 } |
| 565 | 566 |
| 567 void WebDevToolsAgentImpl::showCertificateViewer(const Vector<AtomicString>& cer
tificate) |
| 568 { |
| 569 if (m_client) |
| 570 m_client->showCertificateViewer(WebVector<WebString>(certificate)); |
| 571 } |
| 572 |
| 566 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId,
const WebString& method, const WebString& message) | 573 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId,
const WebString& method, const WebString& message) |
| 567 { | 574 { |
| 568 if (!attached()) | 575 if (!attached()) |
| 569 return; | 576 return; |
| 570 if (WebDevToolsAgent::shouldInterruptForMethod(method)) | 577 if (WebDevToolsAgent::shouldInterruptForMethod(method)) |
| 571 MainThreadDebugger::instance()->taskRunner()->runAllTasksDontWait(); | 578 MainThreadDebugger::instance()->taskRunner()->runAllTasksDontWait(); |
| 572 else | 579 else |
| 573 dispatchMessageFromFrontend(sessionId, method, message); | 580 dispatchMessageFromFrontend(sessionId, method, message); |
| 574 } | 581 } |
| 575 | 582 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) | 693 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) |
| 687 { | 694 { |
| 688 return method == "Debugger.pause" | 695 return method == "Debugger.pause" |
| 689 || method == "Debugger.setBreakpoint" | 696 || method == "Debugger.setBreakpoint" |
| 690 || method == "Debugger.setBreakpointByUrl" | 697 || method == "Debugger.setBreakpointByUrl" |
| 691 || method == "Debugger.removeBreakpoint" | 698 || method == "Debugger.removeBreakpoint" |
| 692 || method == "Debugger.setBreakpointsActive"; | 699 || method == "Debugger.setBreakpointsActive"; |
| 693 } | 700 } |
| 694 | 701 |
| 695 } // namespace blink | 702 } // namespace blink |
| OLD | NEW |