| 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 #ifndef InstrumentingAgents_h | 31 #ifndef InstrumentingAgents_h | 
| 32 #define InstrumentingAgents_h | 32 #define InstrumentingAgents_h | 
| 33 | 33 | 
| 34 #include <wtf/FastAllocBase.h> | 34 #include <wtf/FastAllocBase.h> | 
| 35 #include <wtf/Noncopyable.h> | 35 #include <wtf/Noncopyable.h> | 
|  | 36 #include <wtf/PassRefPtr.h> | 
|  | 37 #include <wtf/RefCounted.h> | 
| 36 | 38 | 
| 37 namespace WebCore { | 39 namespace WebCore { | 
| 38 | 40 | 
| 39 class InspectorAgent; | 41 class InspectorAgent; | 
| 40 class InspectorApplicationCacheAgent; | 42 class InspectorApplicationCacheAgent; | 
| 41 class InspectorCSSAgent; | 43 class InspectorCSSAgent; | 
| 42 class InspectorCanvasAgent; | 44 class InspectorCanvasAgent; | 
| 43 class InspectorConsoleAgent; | 45 class InspectorConsoleAgent; | 
| 44 class InspectorDOMAgent; | 46 class InspectorDOMAgent; | 
| 45 class InspectorDOMDebuggerAgent; | 47 class InspectorDOMDebuggerAgent; | 
| 46 class InspectorDOMStorageAgent; | 48 class InspectorDOMStorageAgent; | 
| 47 class InspectorDatabaseAgent; | 49 class InspectorDatabaseAgent; | 
| 48 class InspectorDebuggerAgent; | 50 class InspectorDebuggerAgent; | 
| 49 class InspectorFileSystemAgent; | 51 class InspectorFileSystemAgent; | 
| 50 class InspectorLayerTreeAgent; | 52 class InspectorLayerTreeAgent; | 
| 51 class InspectorPageAgent; | 53 class InspectorPageAgent; | 
| 52 class InspectorProfilerAgent; | 54 class InspectorProfilerAgent; | 
| 53 class InspectorResourceAgent; | 55 class InspectorResourceAgent; | 
| 54 class InspectorTimelineAgent; | 56 class InspectorTimelineAgent; | 
| 55 class InspectorWorkerAgent; | 57 class InspectorWorkerAgent; | 
| 56 class Page; | 58 class Page; | 
| 57 class PageDebuggerAgent; | 59 class PageDebuggerAgent; | 
| 58 class PageRuntimeAgent; | 60 class PageRuntimeAgent; | 
| 59 class WorkerContext; | 61 class WorkerContext; | 
| 60 class WorkerRuntimeAgent; | 62 class WorkerRuntimeAgent; | 
| 61 | 63 | 
| 62 class InstrumentingAgents { | 64 class InstrumentingAgents : public RefCounted<InstrumentingAgents> { | 
| 63     WTF_MAKE_NONCOPYABLE(InstrumentingAgents); | 65     WTF_MAKE_NONCOPYABLE(InstrumentingAgents); | 
| 64     WTF_MAKE_FAST_ALLOCATED; | 66     WTF_MAKE_FAST_ALLOCATED; | 
| 65 public: | 67 public: | 
| 66     InstrumentingAgents() | 68     static PassRefPtr<InstrumentingAgents> create() | 
| 67         : m_inspectorAgent(0) | 69     { | 
| 68         , m_inspectorPageAgent(0) | 70         return adoptRef(new InstrumentingAgents()); | 
| 69         , m_inspectorCSSAgent(0) | 71     } | 
| 70 #if USE(ACCELERATED_COMPOSITING) |  | 
| 71         , m_inspectorLayerTreeAgent(0) |  | 
| 72 #endif |  | 
| 73         , m_inspectorConsoleAgent(0) |  | 
| 74         , m_inspectorDOMAgent(0) |  | 
| 75         , m_inspectorResourceAgent(0) |  | 
| 76         , m_pageRuntimeAgent(0) |  | 
| 77         , m_workerRuntimeAgent(0) |  | 
| 78         , m_inspectorTimelineAgent(0) |  | 
| 79         , m_inspectorDOMStorageAgent(0) |  | 
| 80 #if ENABLE(SQL_DATABASE) |  | 
| 81         , m_inspectorDatabaseAgent(0) |  | 
| 82 #endif |  | 
| 83 #if ENABLE(FILE_SYSTEM) |  | 
| 84         , m_inspectorFileSystemAgent(0) |  | 
| 85 #endif |  | 
| 86         , m_inspectorApplicationCacheAgent(0) |  | 
| 87 #if ENABLE(JAVASCRIPT_DEBUGGER) |  | 
| 88         , m_inspectorDebuggerAgent(0) |  | 
| 89         , m_pageDebuggerAgent(0) |  | 
| 90         , m_inspectorDOMDebuggerAgent(0) |  | 
| 91         , m_inspectorProfilerAgent(0) |  | 
| 92 #endif |  | 
| 93 #if ENABLE(WORKERS) |  | 
| 94         , m_inspectorWorkerAgent(0) |  | 
| 95 #endif |  | 
| 96         , m_inspectorCanvasAgent(0) |  | 
| 97     { } |  | 
| 98     ~InstrumentingAgents() { } | 72     ~InstrumentingAgents() { } | 
|  | 73     void reset(); | 
| 99 | 74 | 
| 100     InspectorAgent* inspectorAgent() const { return m_inspectorAgent; } | 75     InspectorAgent* inspectorAgent() const { return m_inspectorAgent; } | 
| 101     void setInspectorAgent(InspectorAgent* agent) { m_inspectorAgent = agent; } | 76     void setInspectorAgent(InspectorAgent* agent) { m_inspectorAgent = agent; } | 
| 102 | 77 | 
| 103     InspectorPageAgent* inspectorPageAgent() const { return m_inspectorPageAgent
     ; } | 78     InspectorPageAgent* inspectorPageAgent() const { return m_inspectorPageAgent
     ; } | 
| 104     void setInspectorPageAgent(InspectorPageAgent* agent) { m_inspectorPageAgent
      = agent; } | 79     void setInspectorPageAgent(InspectorPageAgent* agent) { m_inspectorPageAgent
      = agent; } | 
| 105 | 80 | 
| 106     InspectorCSSAgent* inspectorCSSAgent() const { return m_inspectorCSSAgent; } | 81     InspectorCSSAgent* inspectorCSSAgent() const { return m_inspectorCSSAgent; } | 
| 107     void setInspectorCSSAgent(InspectorCSSAgent* agent) { m_inspectorCSSAgent = 
     agent; } | 82     void setInspectorCSSAgent(InspectorCSSAgent* agent) { m_inspectorCSSAgent = 
     agent; } | 
| 108 | 83 | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 161 | 136 | 
| 162     InspectorCanvasAgent* inspectorCanvasAgent() const { return m_inspectorCanva
     sAgent; } | 137     InspectorCanvasAgent* inspectorCanvasAgent() const { return m_inspectorCanva
     sAgent; } | 
| 163     void setInspectorCanvasAgent(InspectorCanvasAgent* agent) { m_inspectorCanva
     sAgent = agent; } | 138     void setInspectorCanvasAgent(InspectorCanvasAgent* agent) { m_inspectorCanva
     sAgent = agent; } | 
| 164 | 139 | 
| 165 #if USE(ACCELERATED_COMPOSITING) | 140 #if USE(ACCELERATED_COMPOSITING) | 
| 166     InspectorLayerTreeAgent* inspectorLayerTreeAgent() const { return m_inspecto
     rLayerTreeAgent; } | 141     InspectorLayerTreeAgent* inspectorLayerTreeAgent() const { return m_inspecto
     rLayerTreeAgent; } | 
| 167     void setInspectorLayerTreeAgent(InspectorLayerTreeAgent* agent) { m_inspecto
     rLayerTreeAgent = agent; } | 142     void setInspectorLayerTreeAgent(InspectorLayerTreeAgent* agent) { m_inspecto
     rLayerTreeAgent = agent; } | 
| 168 #endif | 143 #endif | 
| 169 | 144 | 
| 170 private: | 145 private: | 
|  | 146     InstrumentingAgents(); | 
|  | 147 | 
| 171     InspectorAgent* m_inspectorAgent; | 148     InspectorAgent* m_inspectorAgent; | 
| 172     InspectorPageAgent* m_inspectorPageAgent; | 149     InspectorPageAgent* m_inspectorPageAgent; | 
| 173     InspectorCSSAgent* m_inspectorCSSAgent; | 150     InspectorCSSAgent* m_inspectorCSSAgent; | 
| 174 #if USE(ACCELERATED_COMPOSITING) | 151 #if USE(ACCELERATED_COMPOSITING) | 
| 175     InspectorLayerTreeAgent* m_inspectorLayerTreeAgent; | 152     InspectorLayerTreeAgent* m_inspectorLayerTreeAgent; | 
| 176 #endif | 153 #endif | 
| 177     InspectorConsoleAgent* m_inspectorConsoleAgent; | 154     InspectorConsoleAgent* m_inspectorConsoleAgent; | 
| 178     InspectorDOMAgent* m_inspectorDOMAgent; | 155     InspectorDOMAgent* m_inspectorDOMAgent; | 
| 179     InspectorResourceAgent* m_inspectorResourceAgent; | 156     InspectorResourceAgent* m_inspectorResourceAgent; | 
| 180     PageRuntimeAgent* m_pageRuntimeAgent; | 157     PageRuntimeAgent* m_pageRuntimeAgent; | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 201 }; | 178 }; | 
| 202 | 179 | 
| 203 InstrumentingAgents* instrumentationForPage(Page*); | 180 InstrumentingAgents* instrumentationForPage(Page*); | 
| 204 #if ENABLE(WORKERS) | 181 #if ENABLE(WORKERS) | 
| 205 InstrumentingAgents* instrumentationForWorkerContext(WorkerContext*); | 182 InstrumentingAgents* instrumentationForWorkerContext(WorkerContext*); | 
| 206 #endif | 183 #endif | 
| 207 | 184 | 
| 208 } | 185 } | 
| 209 | 186 | 
| 210 #endif // !defined(InstrumentingAgents_h) | 187 #endif // !defined(InstrumentingAgents_h) | 
| OLD | NEW | 
|---|