Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: Source/core/inspector/InspectorInstrumentation.cpp

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
37 #include "core/inspector/InspectorController.h" 37 #include "core/inspector/InspectorController.h"
38 #include "core/inspector/InspectorDebuggerAgent.h" 38 #include "core/inspector/InspectorDebuggerAgent.h"
39 #include "core/inspector/InspectorPageAgent.h" 39 #include "core/inspector/InspectorPageAgent.h"
40 #include "core/inspector/InspectorProfilerAgent.h" 40 #include "core/inspector/InspectorProfilerAgent.h"
41 #include "core/inspector/InspectorResourceAgent.h" 41 #include "core/inspector/InspectorResourceAgent.h"
42 #include "core/inspector/InspectorTimelineAgent.h" 42 #include "core/inspector/InspectorTimelineAgent.h"
43 #include "core/inspector/InspectorWorkerAgent.h" 43 #include "core/inspector/InspectorWorkerAgent.h"
44 #include "core/inspector/InstrumentingAgents.h" 44 #include "core/inspector/InstrumentingAgents.h"
45 #include "core/inspector/WorkerInspectorController.h" 45 #include "core/inspector/WorkerInspectorController.h"
46 #include "core/loader/cache/CachedResourceInitiatorInfo.h" 46 #include "core/loader/cache/CachedResourceInitiatorInfo.h"
47 #include "core/workers/WorkerContext.h" 47 #include "core/workers/WorkerGlobalScope.h"
48 48
49 namespace WebCore { 49 namespace WebCore {
50 50
51 namespace { 51 namespace {
52 static HashSet<InstrumentingAgents*>* instrumentingAgentsSet = 0; 52 static HashSet<InstrumentingAgents*>* instrumentingAgentsSet = 0;
53 } 53 }
54 54
55 namespace InspectorInstrumentation { 55 namespace InspectorInstrumentation {
56 int FrontendCounter::s_frontendCounter = 0; 56 int FrontendCounter::s_frontendCounter = 0;
57 } 57 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (!page) 200 if (!page)
201 return 0; 201 return 0;
202 return instrumentationForPage(page); 202 return instrumentationForPage(page);
203 } 203 }
204 204
205 InstrumentingAgents* instrumentingAgentsForRenderObject(RenderObject* renderer) 205 InstrumentingAgents* instrumentingAgentsForRenderObject(RenderObject* renderer)
206 { 206 {
207 return instrumentingAgentsForFrame(renderer->frame()); 207 return instrumentingAgentsForFrame(renderer->frame());
208 } 208 }
209 209
210 InstrumentingAgents* instrumentingAgentsForWorkerContext(WorkerContext* workerCo ntext) 210 InstrumentingAgents* instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
211 { 211 {
212 if (!workerContext) 212 if (!workerGlobalScope)
213 return 0; 213 return 0;
214 return instrumentationForWorkerContext(workerContext); 214 return instrumentationForWorkerGlobalScope(workerGlobalScope);
215 } 215 }
216 216
217 InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ScriptExecutionCon text* context) 217 InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ScriptExecutionCon text* context)
218 { 218 {
219 if (context->isWorkerContext()) 219 if (context->isWorkerGlobalScope())
220 return instrumentationForWorkerContext(static_cast<WorkerContext*>(conte xt)); 220 return instrumentationForWorkerGlobalScope(static_cast<WorkerGlobalScope *>(context));
221 return 0; 221 return 0;
222 } 222 }
223 223
224 bool cssErrorFilter(const CSSParserString& content, int propertyId, int errorTyp e) 224 bool cssErrorFilter(const CSSParserString& content, int propertyId, int errorTyp e)
225 { 225 {
226 return InspectorCSSAgent::cssErrorFilter(content, propertyId, errorType); 226 return InspectorCSSAgent::cssErrorFilter(content, propertyId, errorType);
227 } 227 }
228 228
229 } // namespace InspectorInstrumentation 229 } // namespace InspectorInstrumentation
230 230
(...skipping 14 matching lines...) Expand all
245 }; 245 };
246 246
247 InstrumentingAgents* instrumentationForPage(Page* page) 247 InstrumentingAgents* instrumentationForPage(Page* page)
248 { 248 {
249 ASSERT(isMainThread()); 249 ASSERT(isMainThread());
250 if (InspectorController* controller = page->inspectorController()) 250 if (InspectorController* controller = page->inspectorController())
251 return controller->m_instrumentingAgents.get(); 251 return controller->m_instrumentingAgents.get();
252 return 0; 252 return 0;
253 } 253 }
254 254
255 InstrumentingAgents* instrumentationForWorkerContext(WorkerContext* workerContex t) 255 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work erGlobalScope)
256 { 256 {
257 if (WorkerInspectorController* controller = workerContext->workerInspectorCo ntroller()) 257 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect orController())
258 return controller->m_instrumentingAgents.get(); 258 return controller->m_instrumentingAgents.get();
259 return 0; 259 return 0;
260 } 260 }
261 261
262 } // namespace WebCore 262 } // namespace WebCore
263 263
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698