Changeset 84773 in webkit
- Timestamp:
- Apr 25, 2011 6:27:49 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 19 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r84522 r84773 924 924 inspector/InspectorTimelineAgent.cpp 925 925 inspector/InspectorValues.cpp 926 inspector/InspectorWorkerAgent.cpp 926 927 inspector/PageDebuggerAgent.cpp 927 928 inspector/ScriptArguments.cpp -
trunk/Source/WebCore/ChangeLog
r84772 r84773 1 2011-04-25 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: introduce InspectorWorkerAgent 6 https://bugs.webkit.org/show_bug.cgi?id=59320 7 8 InspectorWorkerAgent is responsible for routing inspector messages 9 between worker context inspector agents and corresponding worker 10 inspector front-end. 11 12 * CMakeLists.txt: 13 * GNUmakefile.list.am: 14 * WebCore.gypi: 15 * WebCore.pro: 16 * WebCore.vcproj/WebCore.vcproj: 17 * WebCore.xcodeproj/project.pbxproj: 18 * inspector/CodeGeneratorInspector.pm: 19 * inspector/Inspector.json: 20 * inspector/InspectorAgent.cpp: 21 (WebCore::InspectorAgent::InspectorAgent): 22 (WebCore::InspectorAgent::setFrontend): 23 (WebCore::InspectorAgent::disconnectFrontend): 24 * inspector/InspectorAgent.h: 25 (WebCore::InspectorAgent::workerAgent): 26 * inspector/InspectorController.cpp: 27 (WebCore::InspectorController::connectFrontend): 28 (WebCore::InspectorController::disconnectFrontend): 29 * inspector/InspectorInstrumentation.cpp: 30 (WebCore::InspectorInstrumentation::didStartWorkerContextImpl): 31 * inspector/InspectorInstrumentation.h: 32 (WebCore::InspectorInstrumentation::willStartWorkerContext): 33 (WebCore::InspectorInstrumentation::didStartWorkerContext): 34 * inspector/InspectorWorkerAgent.cpp: Added. 35 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel): 36 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel): 37 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::id): 38 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::inspectorProxy): 39 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::sendMessageToFrontend): 40 (WebCore::InspectorWorkerAgent::create): 41 (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): 42 (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent): 43 (WebCore::InspectorWorkerAgent::setFrontend): 44 (WebCore::InspectorWorkerAgent::clearFrontend): 45 (WebCore::InspectorWorkerAgent::dispatchMessageOnWorkerInspector): 46 (WebCore::InspectorWorkerAgent::didStartWorkerContext): 47 * inspector/InspectorWorkerAgent.h: Added. 48 * inspector/InstrumentingAgents.h: 49 (WebCore::InstrumentingAgents::InstrumentingAgents): 50 (WebCore::InstrumentingAgents::inspectorWorkerAgent): 51 (WebCore::InstrumentingAgents::setInspectorWorkerAgent): 52 * inspector/WorkerInspectorController.cpp: 53 (WebCore::WorkerInspectorController::connectFrontend): 54 * inspector/generate-inspector-idl: 55 * workers/Worker.cpp: 56 (WebCore::Worker::notifyFinished): 57 * workers/WorkerContextInspectorProxy.h: Added. Platform-specific transport for inspector 58 messages sent from the inspected page worker agent to the worker context inspector agents. 59 (WebCore::WorkerContextInspectorProxy::connectFrontend): 60 (WebCore::WorkerContextInspectorProxy::disconnectFrontend): 61 (WebCore::WorkerContextInspectorProxy::sendMessageToWorkerContextInspector): 62 (WebCore::WorkerContextInspectorProxy::~WorkerContextInspectorProxy): 63 * workers/WorkerContextProxy.h: 64 (WebCore::WorkerContextProxy::inspectorProxy): 65 1 66 2011-04-25 Pavel Feldman <pfeldman@google.com> 2 67 -
trunk/Source/WebCore/GNUmakefile.list.am
r84665 r84773 1994 1994 Source/WebCore/inspector/InspectorValues.cpp \ 1995 1995 Source/WebCore/inspector/InspectorValues.h \ 1996 Source/WebCore/inspector/InspectorWorkerAgent.cpp \ 1997 Source/WebCore/inspector/InspectorWorkerAgent.h \ 1996 1998 Source/WebCore/inspector/InspectorWorkerResource.h \ 1997 1999 Source/WebCore/inspector/InstrumentingAgents.h \ … … 3633 3635 Source/WebCore/workers/WorkerContext.cpp \ 3634 3636 Source/WebCore/workers/WorkerContext.h \ 3637 Source/WebCore/workers/WorkerContextInspectorProxy.h \ 3635 3638 Source/WebCore/workers/WorkerContextProxy.h \ 3636 3639 Source/WebCore/workers/Worker.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r84665 r84773 3290 3290 'inspector/InspectorValues.cpp', 3291 3291 'inspector/InspectorWorkerResource.h', 3292 'inspector/InspectorWorkerAgent.cpp', 3293 'inspector/InspectorWorkerAgent.h', 3292 3294 'inspector/InstrumentingAgents.h', 3293 3295 'inspector/PageDebuggerAgent.cpp', … … 6067 6069 'workers/WorkerContext.cpp', 6068 6070 'workers/WorkerContext.h', 6071 'workers/WorkerContextInspectorProxy.h', 6069 6072 'workers/WorkerContextProxy.h', 6070 6073 'workers/WorkerLoaderProxy.h', -
trunk/Source/WebCore/WebCore.pro
r84668 r84773 844 844 inspector/InspectorTimelineAgent.cpp \ 845 845 inspector/InspectorValues.cpp \ 846 inspector/InspectorWorkerAgent.cpp \ 846 847 inspector/PageDebuggerAgent.cpp \ 847 848 inspector/ScriptArguments.cpp \ … … 1791 1792 inspector/InspectorStyleSheet.h \ 1792 1793 inspector/InspectorTimelineAgent.h \ 1794 inspector/InspectorWorkerAgent.h \ 1793 1795 inspector/InstrumentingAgents.h \ 1794 1796 inspector/PageDebuggerAgent.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r84665 r84773 48267 48267 </File> 48268 48268 <File 48269 RelativePath="..\workers\WorkerContextInspectorProxy.h" 48270 > 48271 </File> 48272 <File 48269 48273 RelativePath="..\workers\WorkerContextProxy.h" 48270 48274 > … … 67204 67208 <File 67205 67209 RelativePath="..\inspector\InspectorValues.h" 67210 > 67211 </File> 67212 <File 67213 RelativePath="..\inspector\InspectorWorkerAgent.cpp" 67214 > 67215 </File> 67216 <File 67217 RelativePath="..\inspector\InspectorWorkerAgent.h" 67206 67218 > 67207 67219 </File> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r84764 r84773 5730 5730 F36E07A51358A8BE00AACBC9 /* WorkerInspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = F36E07A31358A8BE00AACBC9 /* WorkerInspectorController.h */; }; 5731 5731 F375CC071150D300008DDB81 /* InspectorWorkerResource.h in Headers */ = {isa = PBXBuildFile; fileRef = F375CC061150D300008DDB81 /* InspectorWorkerResource.h */; }; 5732 F3810C1B1365A49600ED6E33 /* InspectorWorkerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3810C191365A49600ED6E33 /* InspectorWorkerAgent.cpp */; }; 5733 F3810C1C1365A49600ED6E33 /* InspectorWorkerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3810C1A1365A49600ED6E33 /* InspectorWorkerAgent.h */; }; 5734 F3810C1E1365A4D400ED6E33 /* WorkerContextInspectorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = F3810C1D1365A4D400ED6E33 /* WorkerContextInspectorProxy.h */; }; 5732 5735 F392249C126F11AE00A926D9 /* ScriptCallStackFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F392249A126F11AE00A926D9 /* ScriptCallStackFactory.cpp */; }; 5733 5736 F392249D126F11AE00A926D9 /* ScriptCallStackFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = F392249B126F11AE00A926D9 /* ScriptCallStackFactory.h */; }; … … 12296 12299 F36E07A31358A8BE00AACBC9 /* WorkerInspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerInspectorController.h; sourceTree = "<group>"; }; 12297 12300 F375CC061150D300008DDB81 /* InspectorWorkerResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorWorkerResource.h; sourceTree = "<group>"; }; 12301 F3810C191365A49600ED6E33 /* InspectorWorkerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorWorkerAgent.cpp; sourceTree = "<group>"; }; 12302 F3810C1A1365A49600ED6E33 /* InspectorWorkerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorWorkerAgent.h; sourceTree = "<group>"; }; 12303 F3810C1D1365A4D400ED6E33 /* WorkerContextInspectorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerContextInspectorProxy.h; path = workers/WorkerContextInspectorProxy.h; sourceTree = "<group>"; }; 12298 12304 F392249A126F11AE00A926D9 /* ScriptCallStackFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallStackFactory.cpp; sourceTree = "<group>"; }; 12299 12305 F392249B126F11AE00A926D9 /* ScriptCallStackFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCallStackFactory.h; sourceTree = "<group>"; }; … … 13373 13379 4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */, 13374 13380 4F3289B411A42AAB005ABE7E /* InspectorValues.h */, 13381 F3810C191365A49600ED6E33 /* InspectorWorkerAgent.cpp */, 13382 F3810C1A1365A49600ED6E33 /* InspectorWorkerAgent.h */, 13375 13383 F375CC061150D300008DDB81 /* InspectorWorkerResource.h */, 13376 13384 F3ABFE0B130E9DA000E7F7D1 /* InstrumentingAgents.h */, … … 13509 13517 2E4346370F546A8200B0F1BA /* WorkerContext.h */, 13510 13518 2E4346380F546A8200B0F1BA /* WorkerContext.idl */, 13519 F3810C1D1365A4D400ED6E33 /* WorkerContextInspectorProxy.h */, 13511 13520 2E4346390F546A8200B0F1BA /* WorkerContextProxy.h */, 13512 13521 18F831B70FD48C7800D8C56B /* WorkerLoaderProxy.h */, … … 23069 23078 4358E8811360A31700E4748C /* FEDropShadow.h in Headers */, 23070 23079 4358E8861360A33B00E4748C /* SVGFEDropShadowElement.h in Headers */, 23080 F3810C1C1365A49600ED6E33 /* InspectorWorkerAgent.h in Headers */, 23081 F3810C1E1365A4D400ED6E33 /* WorkerContextInspectorProxy.h in Headers */, 23071 23082 ); 23072 23083 runOnlyForDeploymentPostprocessing = 0; … … 25785 25796 4358E8851360A33B00E4748C /* SVGFEDropShadowElement.cpp in Sources */, 25786 25797 14E0BC56136148A8002AD12E /* JSDOMTokenListCustom.cpp in Sources */, 25798 F3810C1B1365A49600ED6E33 /* InspectorWorkerAgent.cpp in Sources */, 25787 25799 ); 25788 25800 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/inspector/CodeGeneratorInspector.pm
r83739 r84773 85 85 "header" => "InspectorTimelineAgent.h", 86 86 "domainAccessor" => "m_timelineAgent", 87 }; 88 $typeTransform{"Worker"} = { 89 "forward" => "InspectorWorkerAgent", 90 "header" => "InspectorWorkerAgent.h", 91 "domainAccessor" => "m_workerAgent", 87 92 }; 88 93 -
trunk/Source/WebCore/inspector/Inspector.json
r84772 r84773 1675 1675 } 1676 1676 ] 1677 } 1677 }, 1678 { 1679 "domain": "Worker", 1680 "types": [], 1681 "commands": [ 1682 { 1683 "name": "sendMessageToWorker", 1684 "parameters": [ 1685 { "name": "workerId", "type": "integer" }, 1686 { "name": "message", "type": "object" } 1687 ] 1688 } 1689 ], 1690 "events": [ 1691 { 1692 "name": "workerCreated", 1693 "parameters": [ 1694 { "name": "workerId", "type": "integer" } 1695 ] 1696 }, 1697 { 1698 "name": "dispatchMessageFromWorker", 1699 "parameters": [ 1700 { "name": "workerId", "type": "integer" }, 1701 { "name": "message", "type": "object" } 1702 ] 1703 } 1704 ] 1705 }, 1678 1706 ] -
trunk/Source/WebCore/inspector/InspectorAgent.cpp
r84134 r84773 55 55 #include "InspectorTimelineAgent.h" 56 56 #include "InspectorValues.h" 57 #include "InspectorWorkerAgent.h" 57 58 #include "InspectorWorkerResource.h" 58 59 #include "InstrumentingAgents.h" … … 134 135 , m_profilerAgent(InspectorProfilerAgent::create(m_instrumentingAgents.get(), m_consoleAgent.get(), page, m_state.get())) 135 136 #endif 137 #if ENABLE(WORKERS) 138 , m_workerAgent(InspectorWorkerAgent::create(m_instrumentingAgents.get())) 139 #endif 136 140 , m_canIssueEvaluateForTestInFrontend(false) 137 141 { … … 253 257 } 254 258 #endif 259 #if ENABLE(WORKERS) 260 m_workerAgent->setFrontend(m_frontend); 261 #endif 262 255 263 // Dispatch pending frontend commands 256 264 issueEvaluateForTestCommands(); … … 292 300 #endif 293 301 m_pageAgent->clearFrontend(); 302 #if ENABLE(WORKERS) 303 m_workerAgent->clearFrontend(); 304 #endif 294 305 } 295 306 -
trunk/Source/WebCore/inspector/InspectorAgent.h
r83599 r84773 71 71 class InspectorTimelineAgent; 72 72 class InspectorValue; 73 class InspectorWorkerAgent; 73 74 class InspectorWorkerResource; 74 75 class InstrumentingAgents; … … 140 141 InspectorApplicationCacheAgent* applicationCacheAgent() { return m_applicationCacheAgent.get(); } 141 142 #endif 143 #if ENABLE(WORKERS) 144 InspectorWorkerAgent* workerAgent() { return m_workerAgent.get(); } 145 #endif 142 146 143 147 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); … … 223 227 typedef HashMap<intptr_t, RefPtr<InspectorWorkerResource> > WorkersMap; 224 228 WorkersMap m_workers; 229 OwnPtr<InspectorWorkerAgent> m_workerAgent; 225 230 #endif 226 231 bool m_canIssueEvaluateForTestInFrontend; -
trunk/Source/WebCore/inspector/InspectorController.cpp
r83892 r84773 49 49 #include "InspectorProfilerAgent.h" 50 50 #include "InspectorTimelineAgent.h" 51 #include "InspectorWorkerAgent.h" 51 52 #include "Page.h" 52 53 #include "ScriptObject.h" 53 54 #include "Settings.h" 55 #include <wtf/UnusedParam.h> 54 56 55 57 namespace WebCore { … … 139 141 #endif 140 142 m_inspectorAgent->runtimeAgent(), 141 m_inspectorAgent->timelineAgent()); 143 m_inspectorAgent->timelineAgent() 144 #if ENABLE(WORKERS) 145 , m_inspectorAgent->workerAgent() 146 #endif 147 ); 142 148 143 149 if (m_startUserInitiatedDebuggingWhenFrontedIsConnected) { … … 161 167 if (!InspectorInstrumentation::hasFrontends()) 162 168 ScriptController::setCaptureCallStackForUncaughtExceptions(false); 163 164 169 } 165 170 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r84772 r84773 52 52 #include "InspectorResourceAgent.h" 53 53 #include "InspectorTimelineAgent.h" 54 #include "InspectorWorkerAgent.h" 54 55 #include "InstrumentingAgents.h" 55 56 #include "ScriptArguments.h" … … 711 712 712 713 #if ENABLE(WORKERS) 714 void InspectorInstrumentation::didStartWorkerContextImpl(InspectorAgent* inspectorAgent, WorkerContextProxy* workerContextProxy) 715 { 716 if (InspectorWorkerAgent* workerAgent = inspectorAgent->instrumentingAgents()->inspectorWorkerAgent()) 717 workerAgent->didStartWorkerContext(workerContextProxy); 718 } 719 713 720 void InspectorInstrumentation::didCreateWorkerImpl(InspectorAgent* inspectorAgent, intptr_t id, const String& url, bool isSharedWorker) 714 721 { -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r84260 r84773 60 60 class ScriptExecutionContext; 61 61 class StorageArea; 62 class WorkerContextProxy; 62 63 class XMLHttpRequest; 63 64 … … 158 159 159 160 #if ENABLE(WORKERS) 161 static bool willStartWorkerContext(ScriptExecutionContext*, WorkerContextProxy*); 162 static void didStartWorkerContext(ScriptExecutionContext*, WorkerContextProxy*, bool paused); 160 163 static void didCreateWorker(ScriptExecutionContext*, intptr_t id, const String& url, bool isSharedWorker); 161 164 static void didDestroyWorker(ScriptExecutionContext*, intptr_t id); … … 278 281 279 282 #if ENABLE(WORKERS) 283 static void didStartWorkerContextImpl(InspectorAgent*, WorkerContextProxy*); 280 284 static void didCreateWorkerImpl(InspectorAgent*, intptr_t id, const String& url, bool isSharedWorker); 281 285 static void didDestroyWorkerImpl(InspectorAgent*, intptr_t id); … … 802 806 803 807 #if ENABLE(WORKERS) 808 inline bool InspectorInstrumentation::willStartWorkerContext(ScriptExecutionContext* context, WorkerContextProxy*) 809 { 810 #if ENABLE(INSPECTOR) 811 return inspectorAgentWithFrontendForContext(context); 812 #else 813 return false; 814 #endif 815 } 816 817 inline void InspectorInstrumentation::didStartWorkerContext(ScriptExecutionContext* context, WorkerContextProxy* proxy, bool paused) 818 { 819 #if ENABLE(INSPECTOR) 820 if (!paused) 821 return; 822 if (InspectorAgent* inspectorAgent = inspectorAgentWithFrontendForContext(context)) 823 didStartWorkerContextImpl(inspectorAgent, proxy); 824 #endif 825 } 826 804 827 inline void InspectorInstrumentation::didCreateWorker(ScriptExecutionContext* context, intptr_t id, const String& url, bool isSharedWorker) 805 828 { -
trunk/Source/WebCore/inspector/InspectorWorkerAgent.h
r84772 r84773 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 */ 30 30 31 #ifndef WorkerContextProxy_h32 #define WorkerContextProxy_h31 #ifndef InspectorWorkerAgent_h 32 #define InspectorWorkerAgent_h 33 33 34 34 #if ENABLE(WORKERS) 35 35 36 #include "MessagePort.h"37 36 #include <wtf/Forward.h> 38 #include <wtf/ PassOwnPtr.h>37 #include <wtf/HashMap.h> 39 38 40 39 namespace WebCore { 40 class InspectorFrontend; 41 class InspectorObject; 42 class InstrumentingAgents; 43 class WorkerContextProxy; 44 class WorkerContextInspectorProxy; 41 45 42 class KURL; 43 class Worker; 46 typedef String ErrorString; 44 47 45 // A proxy to talk to the worker context. 46 class WorkerContextProxy { 47 public:48 static WorkerContextProxy* create(Worker*);48 class InspectorWorkerAgent { 49 public: 50 static PassOwnPtr<InspectorWorkerAgent> create(InstrumentingAgents*); 51 ~InspectorWorkerAgent(); 49 52 50 virtual ~WorkerContextProxy() {} 53 void setFrontend(InspectorFrontend*); 54 void clearFrontend(); 51 55 52 virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode) = 0; 56 // Called from InspectorInstrumentation 57 void didStartWorkerContext(WorkerContextProxy*); 53 58 54 virtual void terminateWorkerContext() = 0; 59 // Called from InspectorBackendDispatcher 60 void sendMessageToWorker(ErrorString*, int workerId, PassRefPtr<InspectorObject> message); 55 61 56 virtual void postMessageToWorkerContext(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) = 0; 62 private: 63 explicit InspectorWorkerAgent(InstrumentingAgents*); 57 64 58 virtual bool hasPendingActivity() const = 0; 65 InstrumentingAgents* m_instrumentingAgents; 66 InspectorFrontend* m_inspectorFrontend; 59 67 60 virtual void workerObjectDestroyed() = 0; 61 }; 68 class WorkerFrontendChannel; 69 HashMap<int, WorkerFrontendChannel*> m_idToChannel; 70 }; 62 71 63 72 } // namespace WebCore 64 73 74 #endif // !defined(InspectorWorkerAgent_h) 75 65 76 #endif // ENABLE(WORKERS) 66 67 #endif // WorkerContextProxy_h -
trunk/Source/WebCore/inspector/InstrumentingAgents.h
r82281 r84773 51 51 class InspectorRuntimeAgent; 52 52 class InspectorTimelineAgent; 53 class InspectorWorkerAgent; 53 54 54 55 class InstrumentingAgents { … … 78 79 , m_inspectorBrowserDebuggerAgent(0) 79 80 , m_inspectorProfilerAgent(0) 81 #endif 82 #if ENABLE(WORKERS) 83 , m_inspectorWorkerAgent(0) 80 84 #endif 81 85 { } … … 128 132 void setInspectorProfilerAgent(InspectorProfilerAgent* agent) { m_inspectorProfilerAgent = agent; } 129 133 #endif 134 #if ENABLE(WORKERS) 135 InspectorWorkerAgent* inspectorWorkerAgent() const { return m_inspectorWorkerAgent; } 136 void setInspectorWorkerAgent(InspectorWorkerAgent* agent) { m_inspectorWorkerAgent = agent; } 137 #endif 130 138 131 139 private: … … 152 160 InspectorProfilerAgent* m_inspectorProfilerAgent; 153 161 #endif 162 #if ENABLE(WORKERS) 163 InspectorWorkerAgent* m_inspectorWorkerAgent; 164 #endif 154 165 }; 155 166 -
trunk/Source/WebCore/inspector/WorkerInspectorController.cpp
r84125 r84773 128 128 #endif 129 129 m_runtimeAgent.get(), 130 0 // InspectorTimelineAgent 130 0, // InspectorTimelineAgent 131 0 // InspectorWorkerAgent 131 132 ); 132 133 -
trunk/Source/WebCore/inspector/generate-inspector-idl
r83575 r84773 90 90 "Debugger": "JAVASCRIPT_DEBUGGER", 91 91 "BrowserDebugger": "JAVASCRIPT_DEBUGGER", 92 "Profiler": "JAVASCRIPT_DEBUGGER" 92 "Profiler": "JAVASCRIPT_DEBUGGER", 93 "Worker": "WORKERS" 93 94 } 94 95 -
trunk/Source/WebCore/workers/Worker.cpp
r75932 r84773 132 132 dispatchEvent(Event::create(eventNames().errorEvent, false, true)); 133 133 else { 134 bool shouldStartPaused = InspectorInstrumentation::willStartWorkerContext(scriptExecutionContext(), m_contextProxy); 134 135 m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script()); 136 InspectorInstrumentation::didStartWorkerContext(scriptExecutionContext(), m_contextProxy, shouldStartPaused); 135 137 InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script()); 136 138 } -
trunk/Source/WebCore/workers/WorkerContextInspectorProxy.h
r84772 r84773 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2011 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 */ 30 30 31 #ifndef WorkerContext Proxy_h32 #define WorkerContext Proxy_h31 #ifndef WorkerContextInspectorProxy_h 32 #define WorkerContextInspectorProxy_h 33 33 34 #if ENABLE(WORKERS) 34 #if ENABLE(WORKERS) && ENABLE(INSPECTOR) 35 35 36 #include "MessagePort.h"37 36 #include <wtf/Forward.h> 38 #include <wtf/PassOwnPtr.h>39 37 40 38 namespace WebCore { 41 39 42 class KURL; 43 class Worker; 40 class InspectorFrontendChannel; 44 41 45 // A proxy to talk to the worker context. 46 class WorkerContextProxy { 47 public: 48 static WorkerContextProxy* create(Worker*); 49 50 virtual ~WorkerContextProxy() {} 51 52 virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode) = 0; 53 54 virtual void terminateWorkerContext() = 0; 55 56 virtual void postMessageToWorkerContext(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) = 0; 57 58 virtual bool hasPendingActivity() const = 0; 59 60 virtual void workerObjectDestroyed() = 0; 61 }; 42 class WorkerContextInspectorProxy { 43 public: 44 virtual void connectFrontend(InspectorFrontendChannel*) { } 45 virtual void disconnectFrontend() { } 46 virtual void sendMessageToWorkerContextInspector(const String&) { } 47 protected: 48 virtual ~WorkerContextInspectorProxy() { } 49 }; 62 50 63 51 } // namespace WebCore … … 65 53 #endif // ENABLE(WORKERS) 66 54 67 #endif // WorkerContext Proxy_h55 #endif // WorkerContextInspectorProxy_h -
trunk/Source/WebCore/workers/WorkerContextProxy.h
r65021 r84773 42 42 class KURL; 43 43 class Worker; 44 class WorkerContextInspectorProxy; 44 45 45 46 // A proxy to talk to the worker context. … … 59 60 60 61 virtual void workerObjectDestroyed() = 0; 62 63 #if ENABLE(INSPECTOR) 64 virtual WorkerContextInspectorProxy* inspectorProxy() { return 0; } 65 #endif 61 66 }; 62 67
Note: See TracChangeset
for help on using the changeset viewer.