OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 26 matching lines...) Expand all Loading... |
37 #include "core/inspector/IdentifiersFactory.h" | 37 #include "core/inspector/IdentifiersFactory.h" |
38 #include "core/inspector/InjectedScriptHost.h" | 38 #include "core/inspector/InjectedScriptHost.h" |
39 #include "core/inspector/InjectedScriptManager.h" | 39 #include "core/inspector/InjectedScriptManager.h" |
40 #include "core/inspector/InspectorApplicationCacheAgent.h" | 40 #include "core/inspector/InspectorApplicationCacheAgent.h" |
41 #include "core/inspector/InspectorCSSAgent.h" | 41 #include "core/inspector/InspectorCSSAgent.h" |
42 #include "core/inspector/InspectorCanvasAgent.h" | 42 #include "core/inspector/InspectorCanvasAgent.h" |
43 #include "core/inspector/InspectorClient.h" | 43 #include "core/inspector/InspectorClient.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/InspectorDOMStorageAgent.h" | 46 #include "core/inspector/InspectorDOMStorageAgent.h" |
47 #include "core/inspector/InspectorDatabaseAgent.h" | |
48 #include "core/inspector/InspectorDebuggerAgent.h" | 47 #include "core/inspector/InspectorDebuggerAgent.h" |
49 #include "core/inspector/InspectorFrontendClient.h" | 48 #include "core/inspector/InspectorFrontendClient.h" |
50 #include "core/inspector/InspectorHeapProfilerAgent.h" | 49 #include "core/inspector/InspectorHeapProfilerAgent.h" |
51 #include "core/inspector/InspectorInputAgent.h" | 50 #include "core/inspector/InspectorInputAgent.h" |
52 #include "core/inspector/InspectorInspectorAgent.h" | 51 #include "core/inspector/InspectorInspectorAgent.h" |
53 #include "core/inspector/InspectorInstrumentation.h" | 52 #include "core/inspector/InspectorInstrumentation.h" |
54 #include "core/inspector/InspectorLayerTreeAgent.h" | 53 #include "core/inspector/InspectorLayerTreeAgent.h" |
55 #include "core/inspector/InspectorMemoryAgent.h" | 54 #include "core/inspector/InspectorMemoryAgent.h" |
56 #include "core/inspector/InspectorOverlay.h" | 55 #include "core/inspector/InspectorOverlay.h" |
57 #include "core/inspector/InspectorPageAgent.h" | 56 #include "core/inspector/InspectorPageAgent.h" |
(...skipping 28 matching lines...) Expand all Loading... |
86 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage
r)); | 85 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage
r)); |
87 | 86 |
88 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, i
njectedScriptManager, inspectorClient, overlay)); | 87 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, i
njectedScriptManager, inspectorClient, overlay)); |
89 m_pageAgent = pageAgentPtr.get(); | 88 m_pageAgent = pageAgentPtr.get(); |
90 m_agents.append(pageAgentPtr.release()); | 89 m_agents.append(pageAgentPtr.release()); |
91 | 90 |
92 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_pageAgent,
injectedScriptManager, overlay)); | 91 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_pageAgent,
injectedScriptManager, overlay)); |
93 m_domAgent = domAgentPtr.get(); | 92 m_domAgent = domAgentPtr.get(); |
94 m_agents.append(domAgentPtr.release()); | 93 m_agents.append(domAgentPtr.release()); |
95 | 94 |
96 m_agents.append(InspectorDatabaseAgent::create()); | |
97 | |
98 OwnPtr<InspectorTimelineAgent> timelineAgentPtr(InspectorTimelineAgent::crea
te(m_pageAgent, m_domAgent, overlay, | 95 OwnPtr<InspectorTimelineAgent> timelineAgentPtr(InspectorTimelineAgent::crea
te(m_pageAgent, m_domAgent, overlay, |
99 InspectorTimelineAgent::PageInspector, inspectorClient)); | 96 InspectorTimelineAgent::PageInspector, inspectorClient)); |
100 m_timelineAgent = timelineAgentPtr.get(); | 97 m_timelineAgent = timelineAgentPtr.get(); |
101 m_agents.append(timelineAgentPtr.release()); | 98 m_agents.append(timelineAgentPtr.release()); |
102 | 99 |
103 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share
d(); | 100 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share
d(); |
104 | 101 |
105 m_agents.append(PageRuntimeAgent::create(injectedScriptManager, pageScriptDe
bugServer, m_page, m_pageAgent)); | 102 m_agents.append(PageRuntimeAgent::create(injectedScriptManager, pageScriptDe
bugServer, m_page, m_pageAgent)); |
106 | 103 |
107 m_agents.append(PageConsoleAgent::create(injectedScriptManager, m_domAgent,
m_timelineAgent)); | 104 m_agents.append(PageConsoleAgent::create(injectedScriptManager, m_domAgent,
m_timelineAgent)); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void InspectorController::inspectedPageDestroyed() | 164 void InspectorController::inspectedPageDestroyed() |
168 { | 165 { |
169 disconnectFrontend(); | 166 disconnectFrontend(); |
170 m_injectedScriptManager->disconnect(); | 167 m_injectedScriptManager->disconnect(); |
171 m_inspectorClient = 0; | 168 m_inspectorClient = 0; |
172 m_page = 0; | 169 m_page = 0; |
173 } | 170 } |
174 | 171 |
175 void InspectorController::registerModuleAgent(PassOwnPtr<InspectorAgent> agent) | 172 void InspectorController::registerModuleAgent(PassOwnPtr<InspectorAgent> agent) |
176 { | 173 { |
| 174 m_moduleAgents.append(agent.get()); |
177 m_agents.append(agent); | 175 m_agents.append(agent); |
178 } | 176 } |
179 | 177 |
180 void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFronten
dClient> inspectorFrontendClient) | 178 void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFronten
dClient> inspectorFrontendClient) |
181 { | 179 { |
182 m_inspectorFrontendClient = inspectorFrontendClient; | 180 m_inspectorFrontendClient = inspectorFrontendClient; |
183 } | 181 } |
184 | 182 |
185 void InspectorController::didClearWindowObjectInMainWorld(Frame* frame) | 183 void InspectorController::didClearWindowObjectInMainWorld(Frame* frame) |
186 { | 184 { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 void InspectorController::didProcessTask() | 406 void InspectorController::didProcessTask() |
409 { | 407 { |
410 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) | 408 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) |
411 timelineAgent->didProcessTask(); | 409 timelineAgent->didProcessTask(); |
412 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector
ProfilerAgent()) | 410 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector
ProfilerAgent()) |
413 profilerAgent->didProcessTask(); | 411 profilerAgent->didProcessTask(); |
414 if (InspectorDOMDebuggerAgent* domDebuggerAgent = m_instrumentingAgents->ins
pectorDOMDebuggerAgent()) | 412 if (InspectorDOMDebuggerAgent* domDebuggerAgent = m_instrumentingAgents->ins
pectorDOMDebuggerAgent()) |
415 domDebuggerAgent->didProcessTask(); | 413 domDebuggerAgent->didProcessTask(); |
416 } | 414 } |
417 | 415 |
| 416 void InspectorController::didCommitLoadForMainFrame() |
| 417 { |
| 418 Vector<InspectorAgent*> agents = m_moduleAgents; |
| 419 for (size_t i = 0; i < agents.size(); i++) |
| 420 agents[i]->didCommitLoadForMainFrame(); |
| 421 } |
| 422 |
418 void InspectorController::didBeginFrame(int frameId) | 423 void InspectorController::didBeginFrame(int frameId) |
419 { | 424 { |
420 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) | 425 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) |
421 timelineAgent->didBeginFrame(frameId); | 426 timelineAgent->didBeginFrame(frameId); |
422 if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanv
asAgent()) | 427 if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanv
asAgent()) |
423 canvasAgent->didBeginFrame(); | 428 canvasAgent->didBeginFrame(); |
424 } | 429 } |
425 | 430 |
426 void InspectorController::didCancelFrame() | 431 void InspectorController::didCancelFrame() |
427 { | 432 { |
(...skipping 19 matching lines...) Expand all Loading... |
447 timelineAgent->processGPUEvent(InspectorTimelineAgent::GPUEvent(timestam
p, phase, foreign, usedGPUMemoryBytes)); | 452 timelineAgent->processGPUEvent(InspectorTimelineAgent::GPUEvent(timestam
p, phase, foreign, usedGPUMemoryBytes)); |
448 } | 453 } |
449 | 454 |
450 void InspectorController::scriptsEnabled(bool enabled) | 455 void InspectorController::scriptsEnabled(bool enabled) |
451 { | 456 { |
452 if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgen
t()) | 457 if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgen
t()) |
453 pageAgent->scriptsEnabled(enabled); | 458 pageAgent->scriptsEnabled(enabled); |
454 } | 459 } |
455 | 460 |
456 } // namespace WebCore | 461 } // namespace WebCore |
OLD | NEW |