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

Side by Side Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.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) 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 // WorkerReportingProxy overrides: 121 // WorkerReportingProxy overrides:
122 void reportException(const String& errorMessage, 122 void reportException(const String& errorMessage,
123 std::unique_ptr<SourceLocation>, 123 std::unique_ptr<SourceLocation>,
124 int exceptionId) override; 124 int exceptionId) override;
125 void reportConsoleMessage(MessageSource, 125 void reportConsoleMessage(MessageSource,
126 MessageLevel, 126 MessageLevel,
127 const String& message, 127 const String& message,
128 SourceLocation*) override; 128 SourceLocation*) override;
129 void postMessageToPageInspector(const String&) override; 129 void postMessageToPageInspector(const String&) override;
130 ParentFrameTaskRunners* getParentFrameTaskRunners() override;
130 void didCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope*) override; 131 void didCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope*) override;
131 void didInitializeWorkerContext() override; 132 void didInitializeWorkerContext() override;
132 void willEvaluateWorkerScript(size_t scriptSize, 133 void willEvaluateWorkerScript(size_t scriptSize,
133 size_t cachedMetadataSize) override; 134 size_t cachedMetadataSize) override;
134 void willEvaluateImportedScript(size_t scriptSize, 135 void willEvaluateImportedScript(size_t scriptSize,
135 size_t cachedMetadataSize) override; 136 size_t cachedMetadataSize) override;
136 void didEvaluateWorkerScript(bool success) override; 137 void didEvaluateWorkerScript(bool success) override;
137 void didCloseWorkerGlobalScope() override; 138 void didCloseWorkerGlobalScope() override;
138 void willDestroyWorkerGlobalScope() override; 139 void willDestroyWorkerGlobalScope() override;
139 void didTerminateWorkerThread() override; 140 void didTerminateWorkerThread() override;
(...skipping 14 matching lines...) Expand all
154 155
155 WebServiceWorkerContextClient& client() const; 156 WebServiceWorkerContextClient& client() const;
156 Document& document() const; 157 Document& document() const;
157 ServiceWorkerGlobalScope* workerGlobalScope() const; 158 ServiceWorkerGlobalScope* workerGlobalScope() const;
158 159
159 // Non-null until the WebEmbeddedWorkerImpl explicitly detach()es 160 // Non-null until the WebEmbeddedWorkerImpl explicitly detach()es
160 // as part of its finalization. 161 // as part of its finalization.
161 WebEmbeddedWorkerImpl* m_embeddedWorker; 162 WebEmbeddedWorkerImpl* m_embeddedWorker;
162 Member<Document> m_document; 163 Member<Document> m_document;
163 164
165 Member<ParentFrameTaskRunners> m_parentFrameTaskRunners;
166
164 HeapHashMap<int, Member<FetchEvent>> m_pendingPreloadFetchEvents; 167 HeapHashMap<int, Member<FetchEvent>> m_pendingPreloadFetchEvents;
165 168
166 WebServiceWorkerContextClient* m_client; 169 WebServiceWorkerContextClient* m_client;
167 170
168 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope; 171 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope;
169 }; 172 };
170 173
171 } // namespace blink 174 } // namespace blink
172 175
173 #endif // ServiceWorkerGlobalScopeProxy_h 176 #endif // ServiceWorkerGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698