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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp

Issue 2201623002: [DevTools] Move WorkerInspectorController to WorkerThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can-execute-scripts
Patch Set: rebased Created 4 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
Index: third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
index 76eb2205278aaf3ccc543c450f393efede265e24..833f5f5d5dace358b05569c996c85859352d5802 100644
--- a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
@@ -102,11 +102,8 @@ void WorkerInspectorProxy::addConsoleMessageFromWorker(ConsoleMessage* consoleMe
static void connectToWorkerGlobalScopeInspectorTask(WorkerThread* workerThread)
{
- WorkerOrWorkletGlobalScope* globalScope = workerThread->globalScope();
- if (globalScope->isWorkerGlobalScope()) {
- if (WorkerInspectorController* inspector = toWorkerGlobalScope(globalScope)->workerInspectorController())
- inspector->connectFrontend();
- }
+ if (WorkerInspectorController* inspector = workerThread->workerInspectorController())
+ inspector->connectFrontend();
}
void WorkerInspectorProxy::connectToInspector(WorkerInspectorProxy::PageInspector* pageInspector)
@@ -120,11 +117,8 @@ void WorkerInspectorProxy::connectToInspector(WorkerInspectorProxy::PageInspecto
static void disconnectFromWorkerGlobalScopeInspectorTask(WorkerThread* workerThread)
{
- WorkerOrWorkletGlobalScope* globalScope = workerThread->globalScope();
- if (globalScope->isWorkerGlobalScope()) {
- if (WorkerInspectorController* inspector = toWorkerGlobalScope(globalScope)->workerInspectorController())
- inspector->disconnectFrontend();
- }
+ if (WorkerInspectorController* inspector = workerThread->workerInspectorController())
+ inspector->disconnectFrontend();
}
void WorkerInspectorProxy::disconnectFromInspector(WorkerInspectorProxy::PageInspector* pageInspector)
@@ -137,11 +131,8 @@ void WorkerInspectorProxy::disconnectFromInspector(WorkerInspectorProxy::PageIns
static void dispatchOnInspectorBackendTask(const String& message, WorkerThread* workerThread)
{
- WorkerOrWorkletGlobalScope* globalScope = workerThread->globalScope();
- if (globalScope->isWorkerGlobalScope()) {
- if (WorkerInspectorController* inspector = toWorkerGlobalScope(globalScope)->workerInspectorController())
- inspector->dispatchMessageFromFrontend(message);
- }
+ if (WorkerInspectorController* inspector = workerThread->workerInspectorController())
+ inspector->dispatchMessageFromFrontend(message);
}
void WorkerInspectorProxy::sendMessageToInspector(const String& message)
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp ('k') | third_party/WebKit/Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698