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/InspectorFileSystemAgent.h" | 48 #include "core/inspector/InspectorFileSystemAgent.h" |
50 #include "core/inspector/InspectorFrontendClient.h" | 49 #include "core/inspector/InspectorFrontendClient.h" |
51 #include "core/inspector/InspectorHeapProfilerAgent.h" | 50 #include "core/inspector/InspectorHeapProfilerAgent.h" |
52 #include "core/inspector/InspectorIndexedDBAgent.h" | 51 #include "core/inspector/InspectorIndexedDBAgent.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" |
(...skipping 30 matching lines...) Expand all Loading... | |
88 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r)); | 87 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r)); |
89 | 88 |
90 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, i njectedScriptManager, inspectorClient, overlay)); | 89 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, i njectedScriptManager, inspectorClient, overlay)); |
91 m_pageAgent = pageAgentPtr.get(); | 90 m_pageAgent = pageAgentPtr.get(); |
92 m_agents.append(pageAgentPtr.release()); | 91 m_agents.append(pageAgentPtr.release()); |
93 | 92 |
94 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_pageAgent, injectedScriptManager, overlay)); | 93 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_pageAgent, injectedScriptManager, overlay)); |
95 m_domAgent = domAgentPtr.get(); | 94 m_domAgent = domAgentPtr.get(); |
96 m_agents.append(domAgentPtr.release()); | 95 m_agents.append(domAgentPtr.release()); |
97 | 96 |
98 m_agents.append(InspectorDatabaseAgent::create()); | |
99 | |
100 OwnPtr<InspectorTimelineAgent> timelineAgentPtr(InspectorTimelineAgent::crea te(m_pageAgent, m_domAgent, overlay, | 97 OwnPtr<InspectorTimelineAgent> timelineAgentPtr(InspectorTimelineAgent::crea te(m_pageAgent, m_domAgent, overlay, |
101 InspectorTimelineAgent::PageInspector, inspectorClient)); | 98 InspectorTimelineAgent::PageInspector, inspectorClient)); |
102 m_timelineAgent = timelineAgentPtr.get(); | 99 m_timelineAgent = timelineAgentPtr.get(); |
103 m_agents.append(timelineAgentPtr.release()); | 100 m_agents.append(timelineAgentPtr.release()); |
104 | 101 |
105 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share d(); | 102 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share d(); |
106 | 103 |
107 m_agents.append(PageRuntimeAgent::create(injectedScriptManager, pageScriptDe bugServer, m_page, m_pageAgent)); | 104 m_agents.append(PageRuntimeAgent::create(injectedScriptManager, pageScriptDe bugServer, m_page, m_pageAgent)); |
108 | 105 |
109 m_agents.append(PageConsoleAgent::create(injectedScriptManager, m_domAgent, m_timelineAgent)); | 106 m_agents.append(PageConsoleAgent::create(injectedScriptManager, m_domAgent, m_timelineAgent)); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 void InspectorController::inspectedPageDestroyed() | 170 void InspectorController::inspectedPageDestroyed() |
174 { | 171 { |
175 disconnectFrontend(); | 172 disconnectFrontend(); |
176 m_injectedScriptManager->disconnect(); | 173 m_injectedScriptManager->disconnect(); |
177 m_inspectorClient = 0; | 174 m_inspectorClient = 0; |
178 m_page = 0; | 175 m_page = 0; |
179 } | 176 } |
180 | 177 |
181 void InspectorController::registerModuleAgent(PassOwnPtr<InspectorAgent> agent) | 178 void InspectorController::registerModuleAgent(PassOwnPtr<InspectorAgent> agent) |
182 { | 179 { |
180 m_moduleAgents.append(agent.get()); | |
183 m_agents.append(agent); | 181 m_agents.append(agent); |
184 } | 182 } |
185 | 183 |
186 void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFronten dClient> inspectorFrontendClient) | 184 void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFronten dClient> inspectorFrontendClient) |
187 { | 185 { |
188 m_inspectorFrontendClient = inspectorFrontendClient; | 186 m_inspectorFrontendClient = inspectorFrontendClient; |
189 } | 187 } |
190 | 188 |
191 void InspectorController::didClearWindowObjectInMainWorld(Frame* frame) | 189 void InspectorController::didClearWindowObjectInMainWorld(Frame* frame) |
192 { | 190 { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 void InspectorController::didProcessTask() | 412 void InspectorController::didProcessTask() |
415 { | 413 { |
416 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) | 414 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) |
417 timelineAgent->didProcessTask(); | 415 timelineAgent->didProcessTask(); |
418 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector ProfilerAgent()) | 416 if (InspectorProfilerAgent* profilerAgent = m_instrumentingAgents->inspector ProfilerAgent()) |
419 profilerAgent->didProcessTask(); | 417 profilerAgent->didProcessTask(); |
420 if (InspectorDOMDebuggerAgent* domDebuggerAgent = m_instrumentingAgents->ins pectorDOMDebuggerAgent()) | 418 if (InspectorDOMDebuggerAgent* domDebuggerAgent = m_instrumentingAgents->ins pectorDOMDebuggerAgent()) |
421 domDebuggerAgent->didProcessTask(); | 419 domDebuggerAgent->didProcessTask(); |
422 } | 420 } |
423 | 421 |
422 void InspectorController::didCommitLoadForMainFrame() | |
423 { | |
424 for (size_t i = 0; i < m_moduleAgents.size(); i++) | |
pfeldman
2014/02/05 13:21:44
Iterate over copy
Vladislav Kaznacheev
2014/02/06 12:38:37
Done.
| |
425 m_moduleAgents[i]->didCommitLoadForMainFrame(); | |
426 } | |
427 | |
424 void InspectorController::didBeginFrame(int frameId) | 428 void InspectorController::didBeginFrame(int frameId) |
425 { | 429 { |
426 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) | 430 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) |
427 timelineAgent->didBeginFrame(frameId); | 431 timelineAgent->didBeginFrame(frameId); |
428 if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanv asAgent()) | 432 if (InspectorCanvasAgent* canvasAgent = m_instrumentingAgents->inspectorCanv asAgent()) |
429 canvasAgent->didBeginFrame(); | 433 canvasAgent->didBeginFrame(); |
430 } | 434 } |
431 | 435 |
432 void InspectorController::didCancelFrame() | 436 void InspectorController::didCancelFrame() |
433 { | 437 { |
(...skipping 19 matching lines...) Expand all Loading... | |
453 timelineAgent->processGPUEvent(InspectorTimelineAgent::GPUEvent(timestam p, phase, foreign, usedGPUMemoryBytes)); | 457 timelineAgent->processGPUEvent(InspectorTimelineAgent::GPUEvent(timestam p, phase, foreign, usedGPUMemoryBytes)); |
454 } | 458 } |
455 | 459 |
456 void InspectorController::scriptsEnabled(bool enabled) | 460 void InspectorController::scriptsEnabled(bool enabled) |
457 { | 461 { |
458 if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgen t()) | 462 if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgen t()) |
459 pageAgent->scriptsEnabled(enabled); | 463 pageAgent->scriptsEnabled(enabled); |
460 } | 464 } |
461 | 465 |
462 } // namespace WebCore | 466 } // namespace WebCore |
OLD | NEW |