Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1343)

Unified Diff: Source/core/inspector/InspectorWorkerAgent.h

Issue 1253293002: Oilpan: Remove raw pointer to ExecutionContext from WorkerInspectorProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/inspector/InspectorWorkerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorWorkerAgent.h
diff --git a/Source/core/inspector/InspectorWorkerAgent.h b/Source/core/inspector/InspectorWorkerAgent.h
index c27ab8962d2db8ec4d5c604a3da11c2cc1218437..e2e08df5d88fdd54edfc25d33e970082c04d9e98 100644
--- a/Source/core/inspector/InspectorWorkerAgent.h
+++ b/Source/core/inspector/InspectorWorkerAgent.h
@@ -34,6 +34,7 @@
#include "core/CoreExport.h"
#include "core/InspectorFrontend.h"
#include "core/inspector/InspectorBaseAgent.h"
+#include "core/workers/WorkerInspectorProxy.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
@@ -45,6 +46,7 @@ class WorkerInspectorProxy;
typedef String ErrorString;
class CORE_EXPORT InspectorWorkerAgent final : public InspectorBaseAgent<InspectorWorkerAgent, InspectorFrontend::Worker>, public InspectorBackendDispatcher::WorkerCommandHandler {
+ WTF_MAKE_NONCOPYABLE(InspectorWorkerAgent);
public:
static PassOwnPtrWillBeRawPtr<InspectorWorkerAgent> create(PageConsoleAgent*);
~InspectorWorkerAgent() override;
@@ -68,6 +70,32 @@ public:
void setTracingSessionId(const String&);
+ class WorkerAgentClient final : public WorkerInspectorProxy::PageInspector {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorWorkerAgent::WorkerAgentClient);
+ public:
+ static PassOwnPtrWillBeRawPtr<WorkerAgentClient> create(InspectorFrontend::Worker*, WorkerInspectorProxy*, const String& id, PageConsoleAgent*);
+ WorkerAgentClient(InspectorFrontend::Worker*, WorkerInspectorProxy*, const String& id, PageConsoleAgent*);
+ ~WorkerAgentClient() override;
+ DECLARE_VIRTUAL_TRACE();
+
+ String id() const { return m_id; }
+ WorkerInspectorProxy* proxy() const { return m_proxy; }
+
+ void connectToWorker();
+ void dispose();
+
+ private:
+ // WorkerInspectorProxy::PageInspector implementation
+ void dispatchMessageFromWorker(const String& message) override;
+ void workerConsoleAgentEnabled(WorkerGlobalScopeProxy*) override;
+
+ InspectorFrontend::Worker* m_frontend;
+ RawPtrWillBeMember<WorkerInspectorProxy> m_proxy;
+ String m_id;
+ bool m_connected;
+ RawPtrWillBeMember<PageConsoleAgent> m_consoleAgent;
+ };
+
private:
InspectorWorkerAgent(PageConsoleAgent*);
void createWorkerAgentClientsForExistingWorkers();
@@ -81,8 +109,8 @@ private:
String url;
String id;
};
- class WorkerAgentClient;
- typedef HashMap<String, WorkerAgentClient*> WorkerClients;
+
+ typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<WorkerAgentClient>> WorkerClients;
WorkerClients m_idToClient;
typedef HashMap<WorkerInspectorProxy*, WorkerInfo> WorkerInfos;
WorkerInfos m_workerInfos;
« no previous file with comments | « no previous file | Source/core/inspector/InspectorWorkerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698