| 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 27 matching lines...) Expand all Loading... |
| 38 #include "core/InspectorFrontend.h" | 38 #include "core/InspectorFrontend.h" |
| 39 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
| 40 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 41 #include "core/inspector/AsyncCallTracker.h" | 41 #include "core/inspector/AsyncCallTracker.h" |
| 42 #include "core/inspector/IdentifiersFactory.h" | 42 #include "core/inspector/IdentifiersFactory.h" |
| 43 #include "core/inspector/InjectedScriptHost.h" | 43 #include "core/inspector/InjectedScriptHost.h" |
| 44 #include "core/inspector/InjectedScriptManager.h" | 44 #include "core/inspector/InjectedScriptManager.h" |
| 45 #include "core/inspector/InspectorAnimationAgent.h" | 45 #include "core/inspector/InspectorAnimationAgent.h" |
| 46 #include "core/inspector/InspectorApplicationCacheAgent.h" | 46 #include "core/inspector/InspectorApplicationCacheAgent.h" |
| 47 #include "core/inspector/InspectorCSSAgent.h" | 47 #include "core/inspector/InspectorCSSAgent.h" |
| 48 #include "core/inspector/InspectorCanvasAgent.h" | |
| 49 #include "core/inspector/InspectorDOMAgent.h" | 48 #include "core/inspector/InspectorDOMAgent.h" |
| 50 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 49 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
| 51 #include "core/inspector/InspectorDebuggerAgent.h" | 50 #include "core/inspector/InspectorDebuggerAgent.h" |
| 52 #include "core/inspector/InspectorHeapProfilerAgent.h" | 51 #include "core/inspector/InspectorHeapProfilerAgent.h" |
| 53 #include "core/inspector/InspectorInputAgent.h" | 52 #include "core/inspector/InspectorInputAgent.h" |
| 54 #include "core/inspector/InspectorInspectorAgent.h" | 53 #include "core/inspector/InspectorInspectorAgent.h" |
| 55 #include "core/inspector/InspectorInstrumentation.h" | 54 #include "core/inspector/InspectorInstrumentation.h" |
| 56 #include "core/inspector/InspectorLayerTreeAgent.h" | 55 #include "core/inspector/InspectorLayerTreeAgent.h" |
| 57 #include "core/inspector/InspectorMemoryAgent.h" | 56 #include "core/inspector/InspectorMemoryAgent.h" |
| 58 #include "core/inspector/InspectorOverlay.h" | 57 #include "core/inspector/InspectorOverlay.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 m_asyncCallTracker = adoptPtrWillBeNoop(new AsyncCallTracker(debuggerAgent,
m_instrumentingAgents.get())); | 464 m_asyncCallTracker = adoptPtrWillBeNoop(new AsyncCallTracker(debuggerAgent,
m_instrumentingAgents.get())); |
| 466 | 465 |
| 467 m_agents.append(InspectorDOMDebuggerAgent::create(m_domAgent, debuggerAgent)
); | 466 m_agents.append(InspectorDOMDebuggerAgent::create(m_domAgent, debuggerAgent)
); |
| 468 | 467 |
| 469 m_agents.append(InspectorInputAgent::create(m_pageAgent, m_inputClient.get()
)); | 468 m_agents.append(InspectorInputAgent::create(m_pageAgent, m_inputClient.get()
)); |
| 470 | 469 |
| 471 m_agents.append(InspectorProfilerAgent::create(injectedScriptManager, m_over
lay)); | 470 m_agents.append(InspectorProfilerAgent::create(injectedScriptManager, m_over
lay)); |
| 472 | 471 |
| 473 m_agents.append(InspectorHeapProfilerAgent::create(injectedScriptManager)); | 472 m_agents.append(InspectorHeapProfilerAgent::create(injectedScriptManager)); |
| 474 | 473 |
| 475 m_agents.append(InspectorCanvasAgent::create(m_pageAgent, injectedScriptMana
ger)); | |
| 476 | |
| 477 m_pageAgent->setDeferredAgents(debuggerAgent, m_cssAgent); | 474 m_pageAgent->setDeferredAgents(debuggerAgent, m_cssAgent); |
| 478 | 475 |
| 479 PageScriptDebugServer* scriptDebugServer = PageScriptDebugServer::instance()
; | 476 PageScriptDebugServer* scriptDebugServer = PageScriptDebugServer::instance()
; |
| 480 m_injectedScriptManager->injectedScriptHost()->init( | 477 m_injectedScriptManager->injectedScriptHost()->init( |
| 481 m_pageConsoleAgent.get(), | 478 m_pageConsoleAgent.get(), |
| 482 debuggerAgent, | 479 debuggerAgent, |
| 483 bind<PassRefPtr<TypeBuilder::Runtime::RemoteObject>, PassRefPtr<JSONObje
ct>>(&InspectorInspectorAgent::inspect, m_inspectorAgent.get()), | 480 bind<PassRefPtr<TypeBuilder::Runtime::RemoteObject>, PassRefPtr<JSONObje
ct>>(&InspectorInspectorAgent::inspect, m_inspectorAgent.get()), |
| 484 scriptDebugServer); | 481 scriptDebugServer); |
| 485 } | 482 } |
| 486 | 483 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 profilerAgent->willProcessTask(); | 723 profilerAgent->willProcessTask(); |
| 727 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"
); | 724 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"
); |
| 728 } | 725 } |
| 729 | 726 |
| 730 void WebDevToolsAgentImpl::didProcessTask() | 727 void WebDevToolsAgentImpl::didProcessTask() |
| 731 { | 728 { |
| 732 if (!m_attached) | 729 if (!m_attached) |
| 733 return; | 730 return; |
| 734 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector
ProfilerAgent()) | 731 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector
ProfilerAgent()) |
| 735 profilerAgent->didProcessTask(); | 732 profilerAgent->didProcessTask(); |
| 736 if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanv
asAgent()) | |
| 737 canvasAgent->didProcessTask(); | |
| 738 TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"); | 733 TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"); |
| 739 flushPendingProtocolNotifications(); | 734 flushPendingProtocolNotifications(); |
| 740 } | 735 } |
| 741 | 736 |
| 742 void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* rawDescriptor) | 737 void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* rawDescriptor) |
| 743 { | 738 { |
| 744 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web
Kit API function. | 739 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web
Kit API function. |
| 745 OwnPtr<MessageDescriptor> descriptor = adoptPtr(rawDescriptor); | 740 OwnPtr<MessageDescriptor> descriptor = adoptPtr(rawDescriptor); |
| 746 OwnPtr<DebuggerTask> task = adoptPtr(new DebuggerTask(descriptor.release()))
; | 741 OwnPtr<DebuggerTask> task = adoptPtr(new DebuggerTask(descriptor.release()))
; |
| 747 PageScriptDebugServer::interruptMainThreadAndRun(task.release()); | 742 PageScriptDebugServer::interruptMainThreadAndRun(task.release()); |
| 748 } | 743 } |
| 749 | 744 |
| 750 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) | 745 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) |
| 751 { | 746 { |
| 752 String commandName; | 747 String commandName; |
| 753 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 748 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 754 return false; | 749 return false; |
| 755 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 750 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 756 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 751 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 757 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 752 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 758 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 753 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 759 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 754 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 760 } | 755 } |
| 761 | 756 |
| 762 } // namespace blink | 757 } // namespace blink |
| OLD | NEW |