| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent(); | 162 return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool consoleAgentEnabled(ExecutionContext* executionContext) | 165 bool consoleAgentEnabled(ExecutionContext* executionContext) |
| 166 { | 166 { |
| 167 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); | 167 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); |
| 168 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge
nts->inspectorConsoleAgent() : 0; | 168 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge
nts->inspectorConsoleAgent() : 0; |
| 169 return consoleAgent && consoleAgent->enabled(); | 169 return consoleAgent && consoleAgent->enabled(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool timelineAgentEnabled(ExecutionContext* executionContext) | |
| 173 { | |
| 174 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); | |
| 175 return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent(); | |
| 176 } | |
| 177 | |
| 178 void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents) | 172 void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents) |
| 179 { | 173 { |
| 180 if (!instrumentingAgentsSet) | 174 if (!instrumentingAgentsSet) |
| 181 instrumentingAgentsSet = new HashSet<InstrumentingAgents*>(); | 175 instrumentingAgentsSet = new HashSet<InstrumentingAgents*>(); |
| 182 instrumentingAgentsSet->add(instrumentingAgents); | 176 instrumentingAgentsSet->add(instrumentingAgents); |
| 183 } | 177 } |
| 184 | 178 |
| 185 void unregisterInstrumentingAgents(InstrumentingAgents* instrumentingAgents) | 179 void unregisterInstrumentingAgents(InstrumentingAgents* instrumentingAgents) |
| 186 { | 180 { |
| 187 if (!instrumentingAgentsSet) | 181 if (!instrumentingAgentsSet) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 265 |
| 272 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) | 266 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) |
| 273 { | 267 { |
| 274 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) | 268 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) |
| 275 return controller->m_instrumentingAgents.get(); | 269 return controller->m_instrumentingAgents.get(); |
| 276 return 0; | 270 return 0; |
| 277 } | 271 } |
| 278 | 272 |
| 279 } // namespace blink | 273 } // namespace blink |
| 280 | 274 |
| OLD | NEW |