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

Side by Side Diff: third_party/WebKit/Source/core/dom/CompositorProxyClient.h

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Export CompositorAnimator Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CompositorProxyClient_h 5 #ifndef CompositorProxyClient_h
6 #define CompositorProxyClient_h 6 #define CompositorProxyClient_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/workers/WorkerClients.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h"
11
12 #include <v8.h>
13 10
14 namespace blink { 11 namespace blink {
15 12
16 class CompositorProxy; 13 class CompositorProxy;
17 class WorkerClients;
18 class WorkerGlobalScope;
19 14
20 class CORE_EXPORT CompositorProxyClient : public Supplement<WorkerClients> { 15 class CORE_EXPORT CompositorProxyClient
21 WTF_MAKE_NONCOPYABLE(CompositorProxyClient); 16 : public GarbageCollectedFinalized<CompositorProxyClient> {
17 public:
18 enum Type { kWorkerClient, kWorkletClient };
22 19
23 public: 20 virtual ~CompositorProxyClient(){};
24 CompositorProxyClient() {} 21 DEFINE_INLINE_VIRTUAL_TRACE() {}
25 22
26 static CompositorProxyClient* from(WorkerClients*);
27 static const char* supplementName();
28
29 virtual void dispose() = 0;
30 virtual void setGlobalScope(WorkerGlobalScope*) = 0;
31 virtual void requestAnimationFrame() = 0;
32 virtual void registerCompositorProxy(CompositorProxy*) = 0; 23 virtual void registerCompositorProxy(CompositorProxy*) = 0;
33 // It is not guaranteed to receive an unregister call for every registered 24 // It is not guaranteed to receive an unregister call for every registered
34 // proxy. In fact we only receive one when a proxy is explicitly 25 // proxy. In fact we only receive one when a proxy is explicitly
35 // disconnected otherwise we rely on oilpan collection process to remove the 26 // disconnected otherwise we rely on oilpan collection process to remove the
36 // weak reference to the proxy. 27 // weak reference to the proxy.
37 virtual void unregisterCompositorProxy(CompositorProxy*) = 0; 28 virtual void unregisterCompositorProxy(CompositorProxy*) = 0;
38 }; 29 };
39 30
40 CORE_EXPORT void provideCompositorProxyClientTo(WorkerClients*,
41 CompositorProxyClient*);
42
43 } // namespace blink 31 } // namespace blink
44 32
45 #endif // CompositorProxyClient_h 33 #endif // CompositorProxyClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698