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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "Page.h" | 73 #include "Page.h" |
74 #include "ScriptObject.h" | 74 #include "ScriptObject.h" |
75 #include "Settings.h" | 75 #include "Settings.h" |
76 #include "WebCoreMemoryInstrumentation.h" | 76 #include "WebCoreMemoryInstrumentation.h" |
77 #include <wtf/MemoryInstrumentationVector.h> | 77 #include <wtf/MemoryInstrumentationVector.h> |
78 #include <wtf/UnusedParam.h> | 78 #include <wtf/UnusedParam.h> |
79 | 79 |
80 namespace WebCore { | 80 namespace WebCore { |
81 | 81 |
82 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC
lient) | 82 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC
lient) |
83 : m_instrumentingAgents(adoptPtr(new InstrumentingAgents())) | 83 : m_instrumentingAgents(InstrumentingAgents::create()) |
84 , m_injectedScriptManager(InjectedScriptManager::createForPage()) | 84 , m_injectedScriptManager(InjectedScriptManager::createForPage()) |
85 , m_state(adoptPtr(new InspectorState(inspectorClient))) | 85 , m_state(adoptPtr(new InspectorState(inspectorClient))) |
86 , m_overlay(InspectorOverlay::create(page, inspectorClient)) | 86 , m_overlay(InspectorOverlay::create(page, inspectorClient)) |
87 , m_page(page) | 87 , m_page(page) |
88 , m_inspectorClient(inspectorClient) | 88 , m_inspectorClient(inspectorClient) |
89 { | 89 { |
90 OwnPtr<InspectorAgent> inspectorAgentPtr(InspectorAgent::create(page, m_inje
ctedScriptManager.get(), m_instrumentingAgents.get(), m_state.get())); | 90 OwnPtr<InspectorAgent> inspectorAgentPtr(InspectorAgent::create(page, m_inje
ctedScriptManager.get(), m_instrumentingAgents.get(), m_state.get())); |
91 m_inspectorAgent = inspectorAgentPtr.get(); | 91 m_inspectorAgent = inspectorAgentPtr.get(); |
92 m_agents.append(inspectorAgentPtr.release()); | 92 m_agents.append(inspectorAgentPtr.release()); |
93 | 93 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 #if ENABLE(JAVASCRIPT_DEBUGGER) | 173 #if ENABLE(JAVASCRIPT_DEBUGGER) |
174 runtimeAgent->setScriptDebugServer(&m_debuggerAgent->scriptDebugServer()); | 174 runtimeAgent->setScriptDebugServer(&m_debuggerAgent->scriptDebugServer()); |
175 #endif | 175 #endif |
176 | 176 |
177 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.
get()); | 177 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.
get()); |
178 } | 178 } |
179 | 179 |
180 InspectorController::~InspectorController() | 180 InspectorController::~InspectorController() |
181 { | 181 { |
| 182 m_instrumentingAgents->reset(); |
182 m_agents.discardAgents(); | 183 m_agents.discardAgents(); |
183 ASSERT(!m_inspectorClient); | 184 ASSERT(!m_inspectorClient); |
184 } | 185 } |
185 | 186 |
186 PassOwnPtr<InspectorController> InspectorController::create(Page* page, Inspecto
rClient* client) | 187 PassOwnPtr<InspectorController> InspectorController::create(Page* page, Inspecto
rClient* client) |
187 { | 188 { |
188 return adoptPtr(new InspectorController(page, client)); | 189 return adoptPtr(new InspectorController(page, client)); |
189 } | 190 } |
190 | 191 |
191 void InspectorController::inspectedPageDestroyed() | 192 void InspectorController::inspectedPageDestroyed() |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 418 |
418 void InspectorController::didProcessTask() | 419 void InspectorController::didProcessTask() |
419 { | 420 { |
420 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) | 421 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector
TimelineAgent()) |
421 timelineAgent->didProcessTask(); | 422 timelineAgent->didProcessTask(); |
422 } | 423 } |
423 | 424 |
424 } // namespace WebCore | 425 } // namespace WebCore |
425 | 426 |
426 #endif // ENABLE(INSPECTOR) | 427 #endif // ENABLE(INSPECTOR) |
OLD | NEW |