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 23 matching lines...) Expand all Loading... | |
34 #include "core/events/Event.h" | 34 #include "core/events/Event.h" |
35 #include "core/events/EventTarget.h" | 35 #include "core/events/EventTarget.h" |
36 #include "core/inspector/InspectorCSSAgent.h" | 36 #include "core/inspector/InspectorCSSAgent.h" |
37 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 37 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
38 #include "core/inspector/InspectorNetworkAgent.h" | 38 #include "core/inspector/InspectorNetworkAgent.h" |
39 #include "core/inspector/InspectorPageAgent.h" | 39 #include "core/inspector/InspectorPageAgent.h" |
40 #include "core/inspector/InspectorSession.h" | 40 #include "core/inspector/InspectorSession.h" |
41 #include "core/inspector/InspectorTraceEvents.h" | 41 #include "core/inspector/InspectorTraceEvents.h" |
42 #include "core/inspector/MainThreadDebugger.h" | 42 #include "core/inspector/MainThreadDebugger.h" |
43 #include "core/inspector/ThreadDebugger.h" | 43 #include "core/inspector/ThreadDebugger.h" |
44 #include "core/inspector/WorkerInspectorController.h" | |
45 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
46 #include "core/workers/MainThreadWorkletGlobalScope.h" | |
47 #include "core/workers/WorkerGlobalScope.h" | 45 #include "core/workers/WorkerGlobalScope.h" |
48 #include "core/workers/WorkerThread.h" | |
49 #include "platform/instrumentation/tracing/TraceEvent.h" | 46 #include "platform/instrumentation/tracing/TraceEvent.h" |
50 #include "platform/loader/fetch/FetchInitiatorInfo.h" | 47 #include "platform/loader/fetch/FetchInitiatorInfo.h" |
51 | 48 |
52 namespace blink { | 49 namespace blink { |
53 namespace probe { | 50 namespace probe { |
54 | 51 |
55 AsyncTask::AsyncTask(ExecutionContext* context, | 52 AsyncTask::AsyncTask(ExecutionContext* context, |
56 void* task, | 53 void* task, |
57 const char* step, | 54 const char* step, |
58 bool enabled) | 55 bool enabled) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 } | 129 } |
133 | 130 |
134 void ContinueWithPolicyIgnore(LocalFrame* frame, | 131 void ContinueWithPolicyIgnore(LocalFrame* frame, |
135 DocumentLoader* loader, | 132 DocumentLoader* loader, |
136 unsigned long identifier, | 133 unsigned long identifier, |
137 const ResourceResponse& r, | 134 const ResourceResponse& r, |
138 Resource* resource) { | 135 Resource* resource) { |
139 DidReceiveResourceResponseButCanceled(frame, loader, identifier, r, resource); | 136 DidReceiveResourceResponseButCanceled(frame, loader, identifier, r, resource); |
140 } | 137 } |
141 | 138 |
142 CoreProbeSink* ToCoreProbeSink(WorkerGlobalScope* worker_global_scope) { | |
143 if (!worker_global_scope) | |
144 return nullptr; | |
145 if (WorkerInspectorController* controller = | |
146 worker_global_scope->GetThread()->GetWorkerInspectorController()) | |
147 return controller->InstrumentingAgents(); | |
148 return nullptr; | |
149 } | |
150 | |
151 CoreProbeSink* ToCoreProbeSinkForNonDocumentContext(ExecutionContext* context) { | 139 CoreProbeSink* ToCoreProbeSinkForNonDocumentContext(ExecutionContext* context) { |
dgozman
2017/04/28 00:06:38
Why not replace ToCoreProbeSink in CoreProbes.h as
kinuko
2017/04/28 03:16:26
Done.
| |
152 if (context->IsWorkerGlobalScope()) | 140 return context->GetInstrumentingAgents(); |
153 return ToCoreProbeSink(ToWorkerGlobalScope(context)); | |
154 if (context->IsMainThreadWorkletGlobalScope()) | |
155 return ToCoreProbeSink(ToMainThreadWorkletGlobalScope(context)->GetFrame()); | |
156 return nullptr; | |
157 } | 141 } |
158 | 142 |
159 } // namespace probe | 143 } // namespace probe |
160 } // namespace blink | 144 } // namespace blink |
OLD | NEW |