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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool networkCapability); |
56 ~WorkerInspectorController() override; | 57 ~WorkerInspectorController() override; |
57 DECLARE_TRACE(); | 58 DECLARE_TRACE(); |
58 | 59 |
59 InstrumentingAgents* instrumentingAgents() const { | 60 InstrumentingAgents* instrumentingAgents() const { |
60 return m_instrumentingAgents.get(); | 61 return m_instrumentingAgents.get(); |
61 } | 62 } |
62 | 63 |
63 void connectFrontend(); | 64 void connectFrontend(); |
64 void disconnectFrontend(); | 65 void disconnectFrontend(); |
65 void dispatchMessageFromFrontend(const String&); | 66 void dispatchMessageFromFrontend(const String&); |
66 void dispose(); | 67 void dispose(); |
67 void flushProtocolNotifications(); | 68 void flushProtocolNotifications(); |
68 | 69 |
69 private: | 70 private: |
70 WorkerInspectorController(WorkerThread*, WorkerThreadDebugger*); | 71 WorkerInspectorController(WorkerThread*, |
| 72 WorkerThreadDebugger*, |
| 73 bool networkCapability); |
71 | 74 |
72 // InspectorSession::Client implementation. | 75 // InspectorSession::Client implementation. |
73 void sendProtocolMessage(int sessionId, | 76 void sendProtocolMessage(int sessionId, |
74 int callId, | 77 int callId, |
75 const String& response, | 78 const String& response, |
76 const String& state) override; | 79 const String& state) override; |
77 | 80 |
78 // WebThread::TaskObserver implementation. | 81 // WebThread::TaskObserver implementation. |
79 void willProcessTask() override; | 82 void willProcessTask() override; |
80 void didProcessTask() override; | 83 void didProcessTask() override; |
81 | 84 |
82 WorkerThreadDebugger* m_debugger; | 85 WorkerThreadDebugger* m_debugger; |
83 WorkerThread* m_thread; | 86 WorkerThread* m_thread; |
84 Member<InstrumentingAgents> m_instrumentingAgents; | 87 Member<InstrumentingAgents> m_instrumentingAgents; |
| 88 const bool m_networkCapability; |
85 Member<InspectorSession> m_session; | 89 Member<InspectorSession> m_session; |
86 }; | 90 }; |
87 | 91 |
88 } // namespace blink | 92 } // namespace blink |
89 | 93 |
90 #endif // WorkerInspectorController_h | 94 #endif // WorkerInspectorController_h |
OLD | NEW |