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

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

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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 | « Source/core/inspector/InspectorWorkerAgent.h ('k') | Source/core/inspector/WorkerDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorWorkerAgent.cpp
diff --git a/Source/core/inspector/InspectorWorkerAgent.cpp b/Source/core/inspector/InspectorWorkerAgent.cpp
index 163b4a9237b114f0f48430a031d78a2badf41ec2..4665d47f1df67830db1338a5cfb780a9159cab1d 100644
--- a/Source/core/inspector/InspectorWorkerAgent.cpp
+++ b/Source/core/inspector/InspectorWorkerAgent.cpp
@@ -37,7 +37,7 @@
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/JSONParser.h"
#include "core/platform/JSONValues.h"
-#include "core/workers/WorkerContextProxy.h"
+#include "core/workers/WorkerGlobalScopeProxy.h"
#include "weborigin/KURL.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
@@ -49,10 +49,10 @@ static const char workerInspectionEnabled[] = "workerInspectionEnabled";
static const char autoconnectToWorkers[] = "autoconnectToWorkers";
};
-class InspectorWorkerAgent::WorkerFrontendChannel : public WorkerContextProxy::PageInspector {
+class InspectorWorkerAgent::WorkerFrontendChannel : public WorkerGlobalScopeProxy::PageInspector {
WTF_MAKE_FAST_ALLOCATED;
public:
- explicit WorkerFrontendChannel(InspectorFrontend* frontend, WorkerContextProxy* proxy)
+ explicit WorkerFrontendChannel(InspectorFrontend* frontend, WorkerGlobalScopeProxy* proxy)
: m_frontend(frontend)
, m_proxy(proxy)
, m_id(s_nextId++)
@@ -61,13 +61,13 @@ public:
}
virtual ~WorkerFrontendChannel()
{
- disconnectFromWorkerContext();
+ disconnectFromWorkerGlobalScope();
}
int id() const { return m_id; }
- WorkerContextProxy* proxy() const { return m_proxy; }
+ WorkerGlobalScopeProxy* proxy() const { return m_proxy; }
- void connectToWorkerContext()
+ void connectToWorkerGlobalScope()
{
if (m_connected)
return;
@@ -75,7 +75,7 @@ public:
m_proxy->connectToInspector(this);
}
- void disconnectFromWorkerContext()
+ void disconnectFromWorkerGlobalScope()
{
if (!m_connected)
return;
@@ -84,7 +84,7 @@ public:
}
private:
- // WorkerContextProxy::PageInspector implementation
+ // WorkerGlobalScopeProxy::PageInspector implementation
virtual void dispatchMessageFromWorker(const String& message)
{
RefPtr<JSONValue> value = parseJSON(message);
@@ -97,7 +97,7 @@ private:
}
InspectorFrontend* m_frontend;
- WorkerContextProxy* m_proxy;
+ WorkerGlobalScopeProxy* m_proxy;
int m_id;
bool m_connected;
static int s_nextId;
@@ -165,7 +165,7 @@ void InspectorWorkerAgent::connectToWorker(ErrorString* error, int workerId)
{
WorkerFrontendChannel* channel = m_idToChannel.get(workerId);
if (channel)
- channel->connectToWorkerContext();
+ channel->connectToWorkerGlobalScope();
else
*error = "Worker is gone";
}
@@ -174,7 +174,7 @@ void InspectorWorkerAgent::disconnectFromWorker(ErrorString* error, int workerId
{
WorkerFrontendChannel* channel = m_idToChannel.get(workerId);
if (channel)
- channel->disconnectFromWorkerContext();
+ channel->disconnectFromWorkerGlobalScope();
else
*error = "Worker is gone";
}
@@ -198,14 +198,14 @@ bool InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart()
return m_state->getBoolean(WorkerAgentState::autoconnectToWorkers);
}
-void InspectorWorkerAgent::didStartWorkerContext(WorkerContextProxy* workerContextProxy, const KURL& url)
+void InspectorWorkerAgent::didStartWorkerGlobalScope(WorkerGlobalScopeProxy* workerGlobalScopeProxy, const KURL& url)
{
- m_dedicatedWorkers.set(workerContextProxy, url.string());
+ m_dedicatedWorkers.set(workerGlobalScopeProxy, url.string());
if (m_inspectorFrontend && m_state->getBoolean(WorkerAgentState::workerInspectionEnabled))
- createWorkerFrontendChannel(workerContextProxy, url.string());
+ createWorkerFrontendChannel(workerGlobalScopeProxy, url.string());
}
-void InspectorWorkerAgent::workerContextTerminated(WorkerContextProxy* proxy)
+void InspectorWorkerAgent::workerGlobalScopeTerminated(WorkerGlobalScopeProxy* proxy)
{
m_dedicatedWorkers.remove(proxy);
for (WorkerChannels::iterator it = m_idToChannel.begin(); it != m_idToChannel.end(); ++it) {
@@ -227,21 +227,21 @@ void InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers()
void InspectorWorkerAgent::destroyWorkerFrontendChannels()
{
for (WorkerChannels::iterator it = m_idToChannel.begin(); it != m_idToChannel.end(); ++it) {
- it->value->disconnectFromWorkerContext();
+ it->value->disconnectFromWorkerGlobalScope();
delete it->value;
}
m_idToChannel.clear();
}
-void InspectorWorkerAgent::createWorkerFrontendChannel(WorkerContextProxy* workerContextProxy, const String& url)
+void InspectorWorkerAgent::createWorkerFrontendChannel(WorkerGlobalScopeProxy* workerGlobalScopeProxy, const String& url)
{
- WorkerFrontendChannel* channel = new WorkerFrontendChannel(m_inspectorFrontend, workerContextProxy);
+ WorkerFrontendChannel* channel = new WorkerFrontendChannel(m_inspectorFrontend, workerGlobalScopeProxy);
m_idToChannel.set(channel->id(), channel);
ASSERT(m_inspectorFrontend);
bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnectToWorkers);
if (autoconnectToWorkers)
- channel->connectToWorkerContext();
+ channel->connectToWorkerGlobalScope();
m_inspectorFrontend->worker()->workerCreated(channel->id(), url, autoconnectToWorkers);
}
« no previous file with comments | « Source/core/inspector/InspectorWorkerAgent.h ('k') | Source/core/inspector/WorkerDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698