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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 visitor->trace(m_instrumentingAgents); | 133 visitor->trace(m_instrumentingAgents); |
134 visitor->trace(m_injectedScriptManager); | 134 visitor->trace(m_injectedScriptManager); |
135 visitor->trace(m_state); | 135 visitor->trace(m_state); |
136 visitor->trace(m_domAgent); | 136 visitor->trace(m_domAgent); |
137 visitor->trace(m_pageAgent); | 137 visitor->trace(m_pageAgent); |
138 visitor->trace(m_timelineAgent); | 138 visitor->trace(m_timelineAgent); |
139 visitor->trace(m_cssAgent); | 139 visitor->trace(m_cssAgent); |
140 visitor->trace(m_resourceAgent); | 140 visitor->trace(m_resourceAgent); |
141 visitor->trace(m_layerTreeAgent); | 141 visitor->trace(m_layerTreeAgent); |
142 visitor->trace(m_tracingAgent); | 142 visitor->trace(m_tracingAgent); |
| 143 visitor->trace(m_inspectorFrontendClient); |
143 visitor->trace(m_page); | 144 visitor->trace(m_page); |
144 m_agents.trace(visitor); | 145 m_agents.trace(visitor); |
145 } | 146 } |
146 | 147 |
147 PassOwnPtrWillBeRawPtr<InspectorController> InspectorController::create(Page* pa
ge, InspectorClient* client) | 148 PassOwnPtrWillBeRawPtr<InspectorController> InspectorController::create(Page* pa
ge, InspectorClient* client) |
148 { | 149 { |
149 return adoptPtrWillBeNoop(new InspectorController(page, client)); | 150 return adoptPtrWillBeNoop(new InspectorController(page, client)); |
150 } | 151 } |
151 | 152 |
152 void InspectorController::setTextAutosizingEnabled(bool enabled) | 153 void InspectorController::setTextAutosizingEnabled(bool enabled) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 201 } |
201 | 202 |
202 void InspectorController::willBeDestroyed() | 203 void InspectorController::willBeDestroyed() |
203 { | 204 { |
204 disconnectFrontend(); | 205 disconnectFrontend(); |
205 m_injectedScriptManager->disconnect(); | 206 m_injectedScriptManager->disconnect(); |
206 m_inspectorClient = 0; | 207 m_inspectorClient = 0; |
207 m_page = nullptr; | 208 m_page = nullptr; |
208 m_instrumentingAgents->reset(); | 209 m_instrumentingAgents->reset(); |
209 m_agents.discardAgents(); | 210 m_agents.discardAgents(); |
| 211 if (m_inspectorFrontendClient) |
| 212 m_inspectorFrontendClient->dispose(); |
210 } | 213 } |
211 | 214 |
212 void InspectorController::registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAg
ent> agent) | 215 void InspectorController::registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAg
ent> agent) |
213 { | 216 { |
214 m_agents.append(agent); | 217 m_agents.append(agent); |
215 } | 218 } |
216 | 219 |
217 void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFronten
dClient> inspectorFrontendClient) | 220 void InspectorController::setInspectorFrontendClient(PassOwnPtrWillBeRawPtr<Insp
ectorFrontendClient> inspectorFrontendClient) |
218 { | 221 { |
219 m_inspectorFrontendClient = inspectorFrontendClient; | 222 m_inspectorFrontendClient = inspectorFrontendClient; |
220 } | 223 } |
221 | 224 |
222 void InspectorController::didClearDocumentOfWindowObject(LocalFrame* frame) | 225 void InspectorController::didClearDocumentOfWindowObject(LocalFrame* frame) |
223 { | 226 { |
224 // If the page is supposed to serve as InspectorFrontend notify inspector fr
ontend | 227 // If the page is supposed to serve as InspectorFrontend notify inspector fr
ontend |
225 // client that it's cleared so that the client can expose inspector bindings
. | 228 // client that it's cleared so that the client can expose inspector bindings
. |
226 if (m_inspectorFrontendClient && frame == m_page->mainFrame()) | 229 if (m_inspectorFrontendClient && frame == m_page->mainFrame()) |
227 m_inspectorFrontendClient->windowObjectCleared(); | 230 m_inspectorFrontendClient->windowObjectCleared(); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 m_layerTreeAgent->willAddPageOverlay(layer); | 500 m_layerTreeAgent->willAddPageOverlay(layer); |
498 } | 501 } |
499 | 502 |
500 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) | 503 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) |
501 { | 504 { |
502 if (m_layerTreeAgent) | 505 if (m_layerTreeAgent) |
503 m_layerTreeAgent->didRemovePageOverlay(layer); | 506 m_layerTreeAgent->didRemovePageOverlay(layer); |
504 } | 507 } |
505 | 508 |
506 } // namespace blink | 509 } // namespace blink |
OLD | NEW |