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

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

Issue 2513413003: Worker: Provide a way to access parent frame task runners from a worker thread (Closed)
Patch Set: update comments Created 4 years 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // WorkerReportingProxy methods: 77 // WorkerReportingProxy methods:
78 void reportException(const WTF::String&, 78 void reportException(const WTF::String&,
79 std::unique_ptr<SourceLocation>, 79 std::unique_ptr<SourceLocation>,
80 int exceptionId) override; 80 int exceptionId) override;
81 void reportConsoleMessage(MessageSource, 81 void reportConsoleMessage(MessageSource,
82 MessageLevel, 82 MessageLevel,
83 const String& message, 83 const String& message,
84 SourceLocation*) override; 84 SourceLocation*) override;
85 void postMessageToPageInspector(const WTF::String&) override; 85 void postMessageToPageInspector(const WTF::String&) override;
86 ParentFrameTaskRunners* getParentFrameTaskRunners() override;
86 void didEvaluateWorkerScript(bool success) override {} 87 void didEvaluateWorkerScript(bool success) override {}
87 void didCloseWorkerGlobalScope() override; 88 void didCloseWorkerGlobalScope() override;
88 void willDestroyWorkerGlobalScope() override {} 89 void willDestroyWorkerGlobalScope() override {}
89 void didTerminateWorkerThread() override; 90 void didTerminateWorkerThread() override;
90 91
91 // WebFrameClient methods to support resource loading thru the 'shadow page'. 92 // WebFrameClient methods to support resource loading thru the 'shadow page'.
92 WebApplicationCacheHost* createApplicationCacheHost( 93 WebApplicationCacheHost* createApplicationCacheHost(
93 WebApplicationCacheHostClient*) override; 94 WebApplicationCacheHostClient*) override;
94 void willSendRequest(WebLocalFrame*, WebURLRequest&) override; 95 void willSendRequest(WebLocalFrame*, WebURLRequest&) override;
95 void didFinishDocumentLoad(WebLocalFrame*) override; 96 void didFinishDocumentLoad(WebLocalFrame*) override;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 Persistent<ExecutionContext> m_loadingDocument; 161 Persistent<ExecutionContext> m_loadingDocument;
161 WebView* m_webView; 162 WebView* m_webView;
162 Persistent<WebLocalFrameImpl> m_mainFrame; 163 Persistent<WebLocalFrameImpl> m_mainFrame;
163 bool m_askedToTerminate; 164 bool m_askedToTerminate;
164 165
165 // This one is bound to and used only on the main thread. 166 // This one is bound to and used only on the main thread.
166 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider; 167 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider;
167 168
168 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; 169 Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
169 170
170 Persistent<ParentFrameTaskRunners> m_mainThreadTaskRunners; 171 Persistent<ParentFrameTaskRunners> m_parentFrameTaskRunners;
171 172
172 std::unique_ptr<WorkerThread> m_workerThread; 173 std::unique_ptr<WorkerThread> m_workerThread;
173 174
174 WebSharedWorkerClient* m_client; 175 WebSharedWorkerClient* m_client;
175 176
176 bool m_pauseWorkerContextOnStart; 177 bool m_pauseWorkerContextOnStart;
177 bool m_isPausedOnStart; 178 bool m_isPausedOnStart;
178 179
179 // Kept around only while main script loading is ongoing. 180 // Kept around only while main script loading is ongoing.
180 RefPtr<WorkerScriptLoader> m_mainScriptLoader; 181 RefPtr<WorkerScriptLoader> m_mainScriptLoader;
181 182
182 RefPtr<WorkerLoaderProxy> m_loaderProxy; 183 RefPtr<WorkerLoaderProxy> m_loaderProxy;
183 184
184 WebURL m_url; 185 WebURL m_url;
185 WebString m_name; 186 WebString m_name;
186 WebAddressSpace m_creationAddressSpace; 187 WebAddressSpace m_creationAddressSpace;
187 }; 188 };
188 189
189 } // namespace blink 190 } // namespace blink
190 191
191 #endif // WebSharedWorkerImpl_h 192 #endif // WebSharedWorkerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698