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

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

Issue 2150443002: Supplement should have a Member to the corresponding Supplementable object (Part 1) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp 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 CompositorProxyClientImpl_h 5 #ifndef CompositorProxyClientImpl_h
6 #define CompositorProxyClientImpl_h 6 #define CompositorProxyClientImpl_h
7 7
8 #include "core/dom/CompositorProxyClient.h" 8 #include "core/dom/CompositorProxyClient.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class CompositorMutableStateProvider; 14 class CompositorMutableStateProvider;
15 class CompositorMutatorImpl; 15 class CompositorMutatorImpl;
16 class CompositorWorkerGlobalScope; 16 class CompositorWorkerGlobalScope;
17 class WorkerGlobalScope; 17 class WorkerGlobalScope;
18 18
19 // Mediates between one CompositorWorkerGlobalScope and the associated Composito rMutatorImpl. 19 // Mediates between one CompositorWorkerGlobalScope and the associated Composito rMutatorImpl.
20 // There is one CompositorProxyClientImpl per worker but there may be multiple f or a given 20 // There is one CompositorProxyClientImpl per worker but there may be multiple f or a given
21 // mutator, e.g. if a single document creates multiple CompositorWorker objects. 21 // mutator, e.g. if a single document creates multiple CompositorWorker objects.
22 // 22 //
23 // Should be accessed only on the compositor thread. 23 // Should be accessed only on the compositor thread.
24 class CompositorProxyClientImpl final : public GarbageCollected<CompositorProxyC lientImpl>, public CompositorProxyClient { 24 class CompositorProxyClientImpl final : public GarbageCollected<CompositorProxyC lientImpl>, public CompositorProxyClient {
25 USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl); 25 USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl);
26 WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl); 26 WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl);
27 public: 27 public:
28 CompositorProxyClientImpl(CompositorMutatorImpl*); 28 CompositorProxyClientImpl(CompositorMutatorImpl*, WorkerClients&);
29 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
30 30
31 // Runs the animation frame callback for the frame starting at the given tim e. 31 // Runs the animation frame callback for the frame starting at the given tim e.
32 // Returns true if another animation frame was requested (i.e. should be rei nvoked next frame). 32 // Returns true if another animation frame was requested (i.e. should be rei nvoked next frame).
33 bool mutate(double monotonicTimeNow, CompositorMutableStateProvider*); 33 bool mutate(double monotonicTimeNow, CompositorMutableStateProvider*);
34 34
35 // CompositorProxyClient: 35 // CompositorProxyClient:
36 void setGlobalScope(WorkerGlobalScope*) override; 36 void setGlobalScope(WorkerGlobalScope*) override;
37 void requestAnimationFrame() override; 37 void requestAnimationFrame() override;
38 void registerCompositorProxy(CompositorProxy*) override; 38 void registerCompositorProxy(CompositorProxy*) override;
39 void unregisterCompositorProxy(CompositorProxy*) override; 39 void unregisterCompositorProxy(CompositorProxy*) override;
40 40
41 private: 41 private:
42 bool executeAnimationFrameCallbacks(double monotonicTimeNow); 42 bool executeAnimationFrameCallbacks(double monotonicTimeNow);
43 43
44 Member<CompositorMutatorImpl> m_mutator; 44 Member<CompositorMutatorImpl> m_mutator;
45 45
46 Member<CompositorWorkerGlobalScope> m_globalScope; 46 Member<CompositorWorkerGlobalScope> m_globalScope;
47 bool m_requestedAnimationFrameCallbacks; 47 bool m_requestedAnimationFrameCallbacks;
48 48
49 HeapHashSet<WeakMember<CompositorProxy>> m_proxies; 49 HeapHashSet<WeakMember<CompositorProxy>> m_proxies;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // CompositorProxyClientImpl_h 54 #endif // CompositorProxyClientImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698