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

Unified Diff: Source/web/WebSharedWorkerImpl.h

Issue 534293003: DevTools: Switch shared workers inspection on to the main thread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/web/WebSharedWorkerImpl.cpp » ('j') | Source/web/WebSharedWorkerImpl.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSharedWorkerImpl.h
diff --git a/Source/web/WebSharedWorkerImpl.h b/Source/web/WebSharedWorkerImpl.h
index 695ef3cb0d96db3a5fcd9b7a54048b94d99915ca..d079f4911030d4f1668c740e113fb3386776715c 100644
--- a/Source/web/WebSharedWorkerImpl.h
+++ b/Source/web/WebSharedWorkerImpl.h
@@ -39,6 +39,7 @@
#include "core/workers/WorkerScriptLoaderClient.h"
#include "core/workers/WorkerThread.h"
#include "public/web/WebContentSecurityPolicy.h"
+#include "public/web/WebDevToolsAgentClient.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebSharedWorkerClient.h"
#include "wtf/PassOwnPtr.h"
@@ -68,7 +69,8 @@ class WebSharedWorkerImpl FINAL
: public WorkerReportingProxy
, public WorkerLoaderProxy
, public WebFrameClient
- , public WebSharedWorker {
+ , public WebSharedWorker
+ , public WebDevToolsAgentClient {
public:
explicit WebSharedWorkerImpl(WebSharedWorkerClient*);
@@ -91,6 +93,11 @@ public:
virtual WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*, WebApplicationCacheHostClient*) OVERRIDE;
virtual void didFinishDocumentLoad(WebLocalFrame*) OVERRIDE;
+ // WebDevToolsAgentClient overrides.
+ virtual void sendMessageToInspectorFrontend(const WebString&) OVERRIDE;
+ virtual void saveAgentRuntimeState(const WebString&) OVERRIDE;
+ virtual void resumeStartup() OVERRIDE;
+
// WebSharedWorker methods:
virtual void startWorkerContext(const WebURL&, const WebString& name, const WebString& contentSecurityPolicy, WebContentSecurityPolicyType) OVERRIDE;
virtual void connect(WebMessagePortChannel*) OVERRIDE;
@@ -99,11 +106,7 @@ public:
virtual void pauseWorkerContextOnStart() OVERRIDE;
virtual void resumeWorkerContext() OVERRIDE;
- // FIXME: Remove this once chromium uses the one that receives hostId as a parameter.
- virtual void attachDevTools() OVERRIDE;
virtual void attachDevTools(const WebString& hostId) OVERRIDE;
- // FIXME: Remove this once chromium uses the one that receives hostId as a parameter.
- virtual void reattachDevTools(const WebString& savedState) OVERRIDE;
virtual void reattachDevTools(const WebString& hostId, const WebString& savedState) OVERRIDE;
virtual void detachDevTools() OVERRIDE;
virtual void dispatchDevToolsMessage(const WebString&) OVERRIDE;
@@ -124,6 +127,7 @@ private:
// Creates the shadow loader used for worker network requests.
void initializeLoader(const WebURL&);
+ void startScriptLoader(WebLocalFrame*);
void didReceiveScriptLoaderResponse();
void onScriptLoaderFinished();
@@ -153,7 +157,7 @@ private:
WeakPtr<WebSharedWorkerClient> m_clientWeakPtr;
bool m_pauseWorkerContextOnStart;
- bool m_attachDevToolsOnStart;
+ bool m_isPausedOnStart;
// Kept around only while main script loading is ongoing.
OwnPtr<Loader> m_mainScriptLoader;
« no previous file with comments | « no previous file | Source/web/WebSharedWorkerImpl.cpp » ('j') | Source/web/WebSharedWorkerImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698