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

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

Issue 2204183002: Prepare CompositorWorker for per thread heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
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 void dispose() override;
27
26 // EventTarget 28 // EventTarget
27 const AtomicString& interfaceName() const override; 29 const AtomicString& interfaceName() const override;
28 30
29 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray&, ExceptionState&); 31 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray&, ExceptionState&);
30 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 32 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
31 33
32 int requestAnimationFrame(FrameRequestCallback*); 34 int requestAnimationFrame(FrameRequestCallback*);
33 void cancelAnimationFrame(int id); 35 void cancelAnimationFrame(int id);
34 bool executeAnimationFrameCallbacks(double highResTimeMs); 36 bool executeAnimationFrameCallbacks(double highResTimeMs);
35 37
36 // ExecutionContext: 38 // ExecutionContext:
37 bool isCompositorWorkerGlobalScope() const override { return true; } 39 bool isCompositorWorkerGlobalScope() const override { return true; }
38 40
39 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
40 42
41 private: 43 private:
42 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> , WorkerClients*); 44 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> , WorkerClients*);
43 CompositorWorkerThread* thread() const; 45 CompositorWorkerThread* thread() const;
44 46
45 bool m_executingAnimationFrameCallbacks; 47 bool m_executingAnimationFrameCallbacks;
46 FrameRequestCallbackCollection m_callbackCollection; 48 FrameRequestCallbackCollection m_callbackCollection;
47 }; 49 };
48 50
49 } // namespace blink 51 } // namespace blink
50 52
51 #endif // CompositorWorkerGlobalScope_h 53 #endif // CompositorWorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698