| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/inspector/InspectorSession.h" | 34 #include "core/inspector/InspectorSession.h" |
| 35 #include "core/inspector/InspectorTaskRunner.h" | 35 #include "core/inspector/InspectorTaskRunner.h" |
| 36 #include "public/platform/WebThread.h" | 36 #include "public/platform/WebThread.h" |
| 37 #include "wtf/Allocator.h" | 37 #include "wtf/Allocator.h" |
| 38 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 39 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
| 40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class InstrumentingAgents; | 44 class InspectorInstrumentationAgents; |
| 45 class WorkerThread; | 45 class WorkerThread; |
| 46 class WorkerThreadDebugger; | 46 class WorkerThreadDebugger; |
| 47 | 47 |
| 48 class WorkerInspectorController final | 48 class WorkerInspectorController final |
| 49 : public GarbageCollectedFinalized<WorkerInspectorController>, | 49 : public GarbageCollectedFinalized<WorkerInspectorController>, |
| 50 public InspectorSession::Client, | 50 public InspectorSession::Client, |
| 51 private WebThread::TaskObserver { | 51 private WebThread::TaskObserver { |
| 52 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); | 52 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); |
| 53 | 53 |
| 54 public: | 54 public: |
| 55 static WorkerInspectorController* create(WorkerThread*); | 55 static WorkerInspectorController* create(WorkerThread*); |
| 56 ~WorkerInspectorController() override; | 56 ~WorkerInspectorController() override; |
| 57 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
| 58 | 58 |
| 59 InstrumentingAgents* instrumentingAgents() const { | 59 InspectorInstrumentationAgents* instrumentingAgents() const { |
| 60 return m_instrumentingAgents.get(); | 60 return m_instrumentingAgents.get(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void connectFrontend(); | 63 void connectFrontend(); |
| 64 void disconnectFrontend(); | 64 void disconnectFrontend(); |
| 65 void dispatchMessageFromFrontend(const String&); | 65 void dispatchMessageFromFrontend(const String&); |
| 66 void dispose(); | 66 void dispose(); |
| 67 void flushProtocolNotifications(); | 67 void flushProtocolNotifications(); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 WorkerInspectorController(WorkerThread*, WorkerThreadDebugger*); | 70 WorkerInspectorController(WorkerThread*, WorkerThreadDebugger*); |
| 71 | 71 |
| 72 // InspectorSession::Client implementation. | 72 // InspectorSession::Client implementation. |
| 73 void sendProtocolMessage(int sessionId, | 73 void sendProtocolMessage(int sessionId, |
| 74 int callId, | 74 int callId, |
| 75 const String& response, | 75 const String& response, |
| 76 const String& state) override; | 76 const String& state) override; |
| 77 | 77 |
| 78 // WebThread::TaskObserver implementation. | 78 // WebThread::TaskObserver implementation. |
| 79 void willProcessTask() override; | 79 void willProcessTask() override; |
| 80 void didProcessTask() override; | 80 void didProcessTask() override; |
| 81 | 81 |
| 82 WorkerThreadDebugger* m_debugger; | 82 WorkerThreadDebugger* m_debugger; |
| 83 WorkerThread* m_thread; | 83 WorkerThread* m_thread; |
| 84 Member<InstrumentingAgents> m_instrumentingAgents; | 84 Member<InspectorInstrumentationAgents> m_instrumentingAgents; |
| 85 Member<InspectorSession> m_session; | 85 Member<InspectorSession> m_session; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| 89 | 89 |
| 90 #endif // WorkerInspectorController_h | 90 #endif // WorkerInspectorController_h |
| OLD | NEW |