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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/inspector/InspectorInstrumentation.h" | 32 #include "core/inspector/InspectorInstrumentation.h" |
33 | 33 |
34 #include "core/events/EventTarget.h" | 34 #include "core/events/EventTarget.h" |
35 #include "core/fetch/FetchInitiatorInfo.h" | 35 #include "core/fetch/FetchInitiatorInfo.h" |
| 36 #include "core/frame/FrameHost.h" |
36 #include "core/inspector/InspectorCSSAgent.h" | 37 #include "core/inspector/InspectorCSSAgent.h" |
37 #include "core/inspector/InspectorConsoleAgent.h" | 38 #include "core/inspector/InspectorConsoleAgent.h" |
38 #include "core/inspector/InspectorController.h" | 39 #include "core/inspector/InspectorController.h" |
39 #include "core/inspector/InspectorDebuggerAgent.h" | 40 #include "core/inspector/InspectorDebuggerAgent.h" |
40 #include "core/inspector/InspectorInspectorAgent.h" | 41 #include "core/inspector/InspectorInspectorAgent.h" |
41 #include "core/inspector/InspectorProfilerAgent.h" | 42 #include "core/inspector/InspectorProfilerAgent.h" |
42 #include "core/inspector/InspectorResourceAgent.h" | 43 #include "core/inspector/InspectorResourceAgent.h" |
43 #include "core/inspector/InspectorTimelineAgent.h" | 44 #include "core/inspector/InspectorTimelineAgent.h" |
44 #include "core/inspector/InstrumentingAgents.h" | 45 #include "core/inspector/InstrumentingAgents.h" |
45 #include "core/inspector/ScriptAsyncCallStack.h" | 46 #include "core/inspector/ScriptAsyncCallStack.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 return instrumentingAgentsFor(renderer->frame()); | 222 return instrumentingAgentsFor(renderer->frame()); |
222 } | 223 } |
223 | 224 |
224 InstrumentingAgents* instrumentingAgentsFor(WorkerGlobalScope* workerGlobalScope
) | 225 InstrumentingAgents* instrumentingAgentsFor(WorkerGlobalScope* workerGlobalScope
) |
225 { | 226 { |
226 if (!workerGlobalScope) | 227 if (!workerGlobalScope) |
227 return 0; | 228 return 0; |
228 return instrumentationForWorkerGlobalScope(workerGlobalScope); | 229 return instrumentationForWorkerGlobalScope(workerGlobalScope); |
229 } | 230 } |
230 | 231 |
| 232 InstrumentingAgents* instrumentingAgentsFor(FrameHost* host) |
| 233 { |
| 234 return instrumentationForPage(&host->page()); |
| 235 } |
| 236 |
231 InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext*
context) | 237 InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext*
context) |
232 { | 238 { |
233 if (context->isWorkerGlobalScope()) | 239 if (context->isWorkerGlobalScope()) |
234 return instrumentationForWorkerGlobalScope(toWorkerGlobalScope(context))
; | 240 return instrumentationForWorkerGlobalScope(toWorkerGlobalScope(context))
; |
235 return 0; | 241 return 0; |
236 } | 242 } |
237 | 243 |
238 } // namespace InspectorInstrumentation | 244 } // namespace InspectorInstrumentation |
239 | 245 |
240 namespace InstrumentationEvents { | 246 namespace InstrumentationEvents { |
(...skipping 24 matching lines...) Expand all Loading... |
265 | 271 |
266 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) | 272 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) |
267 { | 273 { |
268 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) | 274 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) |
269 return controller->m_instrumentingAgents.get(); | 275 return controller->m_instrumentingAgents.get(); |
270 return 0; | 276 return 0; |
271 } | 277 } |
272 | 278 |
273 } // namespace blink | 279 } // namespace blink |
274 | 280 |
OLD | NEW |