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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.h

Issue 2332963003: Unset CompositorWorkerGlobalScope during WorkerGlobalScope::dipose. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositorWorkerGlobalScope_h 5 #ifndef CompositorWorkerGlobalScope_h
6 #define CompositorWorkerGlobalScope_h 6 #define CompositorWorkerGlobalScope_h
7 7
8 #include "core/dom/CompositorProxyClient.h" 8 #include "core/dom/CompositorProxyClient.h"
9 #include "core/dom/FrameRequestCallbackCollection.h" 9 #include "core/dom/FrameRequestCallbackCollection.h"
10 #include "core/dom/MessagePort.h" 10 #include "core/dom/MessagePort.h"
11 #include "core/workers/WorkerGlobalScope.h" 11 #include "core/workers/WorkerGlobalScope.h"
12 #include "modules/ModulesExport.h" 12 #include "modules/ModulesExport.h"
13 #include <memory> 13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class CompositorWorkerThread; 17 class CompositorWorkerThread;
18 class WorkerThreadStartupData; 18 class WorkerThreadStartupData;
19 19
20 class MODULES_EXPORT CompositorWorkerGlobalScope final : public WorkerGlobalScop e { 20 class MODULES_EXPORT CompositorWorkerGlobalScope final : public WorkerGlobalScop e {
21 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
22 public: 22 public:
23 static CompositorWorkerGlobalScope* create(CompositorWorkerThread*, std::uni que_ptr<WorkerThreadStartupData>, double timeOrigin); 23 static CompositorWorkerGlobalScope* create(CompositorWorkerThread*, std::uni que_ptr<WorkerThreadStartupData>, double timeOrigin);
24 ~CompositorWorkerGlobalScope() override; 24 ~CompositorWorkerGlobalScope() override;
25 25
26 // EventTarget 26 // EventTarget
27 const AtomicString& interfaceName() const override; 27 const AtomicString& interfaceName() const override;
28 void removeAllEventListeners() override;
28 29
29 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray&, ExceptionState&); 30 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray&, ExceptionState&);
30 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 31 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
31 32
32 int requestAnimationFrame(FrameRequestCallback*); 33 int requestAnimationFrame(FrameRequestCallback*);
33 void cancelAnimationFrame(int id); 34 void cancelAnimationFrame(int id);
34 bool executeAnimationFrameCallbacks(double highResTimeMs); 35 bool executeAnimationFrameCallbacks(double highResTimeMs);
35 36
36 // ExecutionContext: 37 // ExecutionContext:
37 bool isCompositorWorkerGlobalScope() const override { return true; } 38 bool isCompositorWorkerGlobalScope() const override { return true; }
38 39
39 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
40 41
41 private: 42 private:
42 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> , WorkerClients*); 43 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> , WorkerClients*);
43 CompositorWorkerThread* thread() const; 44 CompositorWorkerThread* thread() const;
44 45
45 bool m_executingAnimationFrameCallbacks; 46 bool m_executingAnimationFrameCallbacks;
46 FrameRequestCallbackCollection m_callbackCollection; 47 FrameRequestCallbackCollection m_callbackCollection;
47 }; 48 };
48 49
49 } // namespace blink 50 } // namespace blink
50 51
51 #endif // CompositorWorkerGlobalScope_h 52 #endif // CompositorWorkerGlobalScope_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698