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

Side by Side Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h

Issue 1728803002: Rename WorkerThread to WorkerScript Base URL: https://chromium.googlesource.com/chromium/src.git@workerscript-controller
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 #include "public/web/WebFrameClient.h" 40 #include "public/web/WebFrameClient.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class ServiceWorkerGlobalScopeProxy; 44 class ServiceWorkerGlobalScopeProxy;
45 class WebLocalFrameImpl; 45 class WebLocalFrameImpl;
46 class WebServiceWorkerNetworkProvider; 46 class WebServiceWorkerNetworkProvider;
47 class WebView; 47 class WebView;
48 class WorkerInspectorProxy; 48 class WorkerInspectorProxy;
49 class WorkerScriptLoader; 49 class WorkerScriptLoader;
50 class WorkerThread; 50 class WorkerScript;
51 51
52 class WebEmbeddedWorkerImpl final 52 class WebEmbeddedWorkerImpl final
53 : public WebEmbeddedWorker 53 : public WebEmbeddedWorker
54 , public WebFrameClient 54 , public WebFrameClient
55 , public WebDevToolsAgentClient 55 , public WebDevToolsAgentClient
56 , private WorkerLoaderProxyProvider { 56 , private WorkerLoaderProxyProvider {
57 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl); 57 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl);
58 public: 58 public:
59 WebEmbeddedWorkerImpl(PassOwnPtr<WebServiceWorkerContextClient>, PassOwnPtr< WebWorkerContentSettingsClientProxy>); 59 WebEmbeddedWorkerImpl(PassOwnPtr<WebServiceWorkerContextClient>, PassOwnPtr< WebWorkerContentSettingsClientProxy>);
60 ~WebEmbeddedWorkerImpl() override; 60 ~WebEmbeddedWorkerImpl() override;
(...skipping 17 matching lines...) Expand all
78 void willSendRequest( 78 void willSendRequest(
79 WebLocalFrame*, unsigned identifier, WebURLRequest&, 79 WebLocalFrame*, unsigned identifier, WebURLRequest&,
80 const WebURLResponse& redirectResponse) override; 80 const WebURLResponse& redirectResponse) override;
81 void didFinishDocumentLoad(WebLocalFrame*, bool documentIsEmpty) override; 81 void didFinishDocumentLoad(WebLocalFrame*, bool documentIsEmpty) override;
82 82
83 // WebDevToolsAgentClient overrides. 83 // WebDevToolsAgentClient overrides.
84 void sendProtocolMessage(int sessionId, int callId, const WebString&, const WebString&) override; 84 void sendProtocolMessage(int sessionId, int callId, const WebString&, const WebString&) override;
85 void resumeStartup() override; 85 void resumeStartup() override;
86 86
87 void onScriptLoaderFinished(); 87 void onScriptLoaderFinished();
88 void startWorkerThread(); 88 void startWorkerScript();
89 89
90 // WorkerLoaderProxyProvider 90 // WorkerLoaderProxyProvider
91 void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override; 91 void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override;
92 bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override; 92 bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override;
93 93
94 WebEmbeddedWorkerStartData m_workerStartData; 94 WebEmbeddedWorkerStartData m_workerStartData;
95 95
96 OwnPtr<WebServiceWorkerContextClient> m_workerContextClient; 96 OwnPtr<WebServiceWorkerContextClient> m_workerContextClient;
97 97
98 // This is kept until startWorkerContext is called, and then passed on 98 // This is kept until startWorkerContext is called, and then passed on
99 // to WorkerContext. 99 // to WorkerContext.
100 OwnPtr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient; 100 OwnPtr<WebWorkerContentSettingsClientProxy> m_contentSettingsClient;
101 101
102 // We retain ownership of this one which is for use on the 102 // We retain ownership of this one which is for use on the
103 // main thread only. 103 // main thread only.
104 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider; 104 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider;
105 105
106 // Kept around only while main script loading is ongoing. 106 // Kept around only while main script loading is ongoing.
107 RefPtr<WorkerScriptLoader> m_mainScriptLoader; 107 RefPtr<WorkerScriptLoader> m_mainScriptLoader;
108 108
109 RefPtr<WorkerThread> m_workerThread; 109 RefPtr<WorkerScript> m_workerScript;
110 RefPtr<WorkerLoaderProxy> m_loaderProxy; 110 RefPtr<WorkerLoaderProxy> m_loaderProxy;
111 OwnPtrWillBePersistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopePro xy; 111 OwnPtrWillBePersistent<ServiceWorkerGlobalScopeProxy> m_workerGlobalScopePro xy;
112 OwnPtrWillBePersistent<WorkerInspectorProxy> m_workerInspectorProxy; 112 OwnPtrWillBePersistent<WorkerInspectorProxy> m_workerInspectorProxy;
113 113
114 // 'shadow page' - created to proxy loading requests from the worker. 114 // 'shadow page' - created to proxy loading requests from the worker.
115 // Both WebView and WebFrame objects are close()'ed (where they're 115 // Both WebView and WebFrame objects are close()'ed (where they're
116 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they 116 // deref'ed) when this EmbeddedWorkerImpl is destructed, therefore they
117 // are guaranteed to exist while this object is around. 117 // are guaranteed to exist while this object is around.
118 WebView* m_webView; 118 WebView* m_webView;
119 RefPtrWillBePersistent<WebLocalFrameImpl> m_mainFrame; 119 RefPtrWillBePersistent<WebLocalFrameImpl> m_mainFrame;
(...skipping 11 matching lines...) Expand all
131 DoPauseAfterDownload, 131 DoPauseAfterDownload,
132 IsPausedAfterDownload 132 IsPausedAfterDownload
133 } m_pauseAfterDownloadState; 133 } m_pauseAfterDownloadState;
134 134
135 WaitingForDebuggerState m_waitingForDebuggerState; 135 WaitingForDebuggerState m_waitingForDebuggerState;
136 }; 136 };
137 137
138 } // namespace blink 138 } // namespace blink
139 139
140 #endif // WebEmbeddedWorkerImpl_h 140 #endif // WebEmbeddedWorkerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698