| 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 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 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 | 32 |
| 33 #if ENABLE(INSPECTOR) | |
| 34 | 33 |
| 35 #include "InstrumentingAgents.h" | 34 #include "InstrumentingAgents.h" |
| 36 | 35 |
| 37 #include "InspectorController.h" | 36 #include "InspectorController.h" |
| 38 #include "Page.h" | 37 #include "Page.h" |
| 39 #include "WorkerContext.h" | 38 #include "WorkerContext.h" |
| 40 #include "WorkerInspectorController.h" | 39 #include "WorkerInspectorController.h" |
| 41 #include <wtf/MainThread.h> | 40 #include <wtf/MainThread.h> |
| 42 | 41 |
| 43 namespace WebCore { | 42 namespace WebCore { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 56 , m_workerRuntimeAgent(0) | 55 , m_workerRuntimeAgent(0) |
| 57 , m_inspectorTimelineAgent(0) | 56 , m_inspectorTimelineAgent(0) |
| 58 , m_inspectorDOMStorageAgent(0) | 57 , m_inspectorDOMStorageAgent(0) |
| 59 #if ENABLE(SQL_DATABASE) | 58 #if ENABLE(SQL_DATABASE) |
| 60 , m_inspectorDatabaseAgent(0) | 59 , m_inspectorDatabaseAgent(0) |
| 61 #endif | 60 #endif |
| 62 #if ENABLE(FILE_SYSTEM) | 61 #if ENABLE(FILE_SYSTEM) |
| 63 , m_inspectorFileSystemAgent(0) | 62 , m_inspectorFileSystemAgent(0) |
| 64 #endif | 63 #endif |
| 65 , m_inspectorApplicationCacheAgent(0) | 64 , m_inspectorApplicationCacheAgent(0) |
| 66 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 67 , m_inspectorDebuggerAgent(0) | 65 , m_inspectorDebuggerAgent(0) |
| 68 , m_pageDebuggerAgent(0) | 66 , m_pageDebuggerAgent(0) |
| 69 , m_inspectorDOMDebuggerAgent(0) | 67 , m_inspectorDOMDebuggerAgent(0) |
| 70 , m_inspectorProfilerAgent(0) | 68 , m_inspectorProfilerAgent(0) |
| 71 #endif | |
| 72 #if ENABLE(WORKERS) | 69 #if ENABLE(WORKERS) |
| 73 , m_inspectorWorkerAgent(0) | 70 , m_inspectorWorkerAgent(0) |
| 74 #endif | 71 #endif |
| 75 , m_inspectorCanvasAgent(0) | 72 , m_inspectorCanvasAgent(0) |
| 76 { | 73 { |
| 77 } | 74 } |
| 78 | 75 |
| 79 void InstrumentingAgents::reset() | 76 void InstrumentingAgents::reset() |
| 80 { | 77 { |
| 81 m_inspectorAgent = 0; | 78 m_inspectorAgent = 0; |
| 82 m_inspectorPageAgent = 0; | 79 m_inspectorPageAgent = 0; |
| 83 m_inspectorCSSAgent = 0; | 80 m_inspectorCSSAgent = 0; |
| 84 #if USE(ACCELERATED_COMPOSITING) | 81 #if USE(ACCELERATED_COMPOSITING) |
| 85 m_inspectorLayerTreeAgent = 0; | 82 m_inspectorLayerTreeAgent = 0; |
| 86 #endif | 83 #endif |
| 87 m_inspectorConsoleAgent = 0; | 84 m_inspectorConsoleAgent = 0; |
| 88 m_inspectorDOMAgent = 0; | 85 m_inspectorDOMAgent = 0; |
| 89 m_inspectorResourceAgent = 0; | 86 m_inspectorResourceAgent = 0; |
| 90 m_pageRuntimeAgent = 0; | 87 m_pageRuntimeAgent = 0; |
| 91 m_workerRuntimeAgent = 0; | 88 m_workerRuntimeAgent = 0; |
| 92 m_inspectorTimelineAgent = 0; | 89 m_inspectorTimelineAgent = 0; |
| 93 m_inspectorDOMStorageAgent = 0; | 90 m_inspectorDOMStorageAgent = 0; |
| 94 #if ENABLE(SQL_DATABASE) | 91 #if ENABLE(SQL_DATABASE) |
| 95 m_inspectorDatabaseAgent = 0; | 92 m_inspectorDatabaseAgent = 0; |
| 96 #endif | 93 #endif |
| 97 #if ENABLE(FILE_SYSTEM) | 94 #if ENABLE(FILE_SYSTEM) |
| 98 m_inspectorFileSystemAgent = 0; | 95 m_inspectorFileSystemAgent = 0; |
| 99 #endif | 96 #endif |
| 100 m_inspectorApplicationCacheAgent = 0; | 97 m_inspectorApplicationCacheAgent = 0; |
| 101 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 102 m_inspectorDebuggerAgent = 0; | 98 m_inspectorDebuggerAgent = 0; |
| 103 m_pageDebuggerAgent = 0; | 99 m_pageDebuggerAgent = 0; |
| 104 m_inspectorDOMDebuggerAgent = 0; | 100 m_inspectorDOMDebuggerAgent = 0; |
| 105 m_inspectorProfilerAgent = 0; | 101 m_inspectorProfilerAgent = 0; |
| 106 #endif | |
| 107 #if ENABLE(WORKERS) | 102 #if ENABLE(WORKERS) |
| 108 m_inspectorWorkerAgent = 0; | 103 m_inspectorWorkerAgent = 0; |
| 109 #endif | 104 #endif |
| 110 m_inspectorCanvasAgent = 0; | 105 m_inspectorCanvasAgent = 0; |
| 111 } | 106 } |
| 112 | 107 |
| 113 InstrumentingAgents* instrumentationForPage(Page* page) | 108 InstrumentingAgents* instrumentationForPage(Page* page) |
| 114 { | 109 { |
| 115 ASSERT(isMainThread()); | 110 ASSERT(isMainThread()); |
| 116 if (InspectorController* controller = page->inspectorController()) | 111 if (InspectorController* controller = page->inspectorController()) |
| 117 return controller->m_instrumentingAgents.get(); | 112 return controller->m_instrumentingAgents.get(); |
| 118 return 0; | 113 return 0; |
| 119 } | 114 } |
| 120 | 115 |
| 121 #if ENABLE(WORKERS) | 116 #if ENABLE(WORKERS) |
| 122 InstrumentingAgents* instrumentationForWorkerContext(WorkerContext* workerContex
t) | 117 InstrumentingAgents* instrumentationForWorkerContext(WorkerContext* workerContex
t) |
| 123 { | 118 { |
| 124 if (WorkerInspectorController* controller = workerContext->workerInspectorCo
ntroller()) | 119 if (WorkerInspectorController* controller = workerContext->workerInspectorCo
ntroller()) |
| 125 return controller->m_instrumentingAgents.get(); | 120 return controller->m_instrumentingAgents.get(); |
| 126 return 0; | 121 return 0; |
| 127 } | 122 } |
| 128 #endif | 123 #endif |
| 129 | 124 |
| 130 } // namespace WebCore | 125 } // namespace WebCore |
| 131 | 126 |
| 132 #endif // ENABLE(INSPECTOR) | |
| OLD | NEW |