| 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 "core/inspector/WorkerInspectorController.h" | 31 #include "core/inspector/WorkerInspectorController.h" |
| 32 | 32 |
| 33 #include "core/InstrumentingAgents.h" | 33 #include "core/InspectorInstrumentationAgents.h" |
| 34 #include "core/inspector/InspectorInstrumentation.h" | 34 #include "core/inspector/InspectorInstrumentation.h" |
| 35 #include "core/inspector/InspectorLogAgent.h" | 35 #include "core/inspector/InspectorLogAgent.h" |
| 36 #include "core/inspector/InspectorTraceEvents.h" | 36 #include "core/inspector/InspectorTraceEvents.h" |
| 37 #include "core/inspector/WorkerThreadDebugger.h" | 37 #include "core/inspector/WorkerThreadDebugger.h" |
| 38 #include "core/inspector/protocol/Protocol.h" | 38 #include "core/inspector/protocol/Protocol.h" |
| 39 #include "core/workers/WorkerBackingThread.h" | 39 #include "core/workers/WorkerBackingThread.h" |
| 40 #include "core/workers/WorkerReportingProxy.h" | 40 #include "core/workers/WorkerReportingProxy.h" |
| 41 #include "core/workers/WorkerThread.h" | 41 #include "core/workers/WorkerThread.h" |
| 42 #include "platform/WebThreadSupportingGC.h" | 42 #include "platform/WebThreadSupportingGC.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 WorkerInspectorController* WorkerInspectorController::create( | 46 WorkerInspectorController* WorkerInspectorController::create( |
| 47 WorkerThread* thread) { | 47 WorkerThread* thread) { |
| 48 WorkerThreadDebugger* debugger = | 48 WorkerThreadDebugger* debugger = |
| 49 WorkerThreadDebugger::from(thread->isolate()); | 49 WorkerThreadDebugger::from(thread->isolate()); |
| 50 return debugger ? new WorkerInspectorController(thread, debugger) : nullptr; | 50 return debugger ? new WorkerInspectorController(thread, debugger) : nullptr; |
| 51 } | 51 } |
| 52 | 52 |
| 53 WorkerInspectorController::WorkerInspectorController( | 53 WorkerInspectorController::WorkerInspectorController( |
| 54 WorkerThread* thread, | 54 WorkerThread* thread, |
| 55 WorkerThreadDebugger* debugger) | 55 WorkerThreadDebugger* debugger) |
| 56 : m_debugger(debugger), | 56 : m_debugger(debugger), |
| 57 m_thread(thread), | 57 m_thread(thread), |
| 58 m_instrumentingAgents(new InstrumentingAgents()) { | 58 m_instrumentingAgents(new InspectorInstrumentationAgents()) { |
| 59 m_instrumentingAgents->addInspectorTraceEvents(new InspectorTraceEvents()); | 59 m_instrumentingAgents->addInspectorTraceEvents(new InspectorTraceEvents()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 WorkerInspectorController::~WorkerInspectorController() { | 62 WorkerInspectorController::~WorkerInspectorController() { |
| 63 DCHECK(!m_thread); | 63 DCHECK(!m_thread); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void WorkerInspectorController::connectFrontend() { | 66 void WorkerInspectorController::connectFrontend() { |
| 67 if (m_session) | 67 if (m_session) |
| 68 return; | 68 return; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (m_session) | 119 if (m_session) |
| 120 m_session->flushProtocolNotifications(); | 120 m_session->flushProtocolNotifications(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 DEFINE_TRACE(WorkerInspectorController) { | 123 DEFINE_TRACE(WorkerInspectorController) { |
| 124 visitor->trace(m_instrumentingAgents); | 124 visitor->trace(m_instrumentingAgents); |
| 125 visitor->trace(m_session); | 125 visitor->trace(m_session); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace blink | 128 } // namespace blink |
| OLD | NEW |