Chromium Code Reviews| Index: third_party/WebKit/Source/web/CompositorWorkerProxyClientImpl.h |
| diff --git a/third_party/WebKit/Source/web/CompositorProxyClientImpl.h b/third_party/WebKit/Source/web/CompositorWorkerProxyClientImpl.h |
| similarity index 50% |
| rename from third_party/WebKit/Source/web/CompositorProxyClientImpl.h |
| rename to third_party/WebKit/Source/web/CompositorWorkerProxyClientImpl.h |
| index a75508507bad787eb32c02c1d58e38b04ae95d46..92df6b42c420dd593a65b7aca64007afb014d54a 100644 |
| --- a/third_party/WebKit/Source/web/CompositorProxyClientImpl.h |
| +++ b/third_party/WebKit/Source/web/CompositorWorkerProxyClientImpl.h |
| @@ -2,10 +2,11 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CompositorProxyClientImpl_h |
| -#define CompositorProxyClientImpl_h |
| +#ifndef CompositorWorkerProxyClientImpl_h |
| +#define CompositorWorkerProxyClientImpl_h |
| -#include "core/dom/CompositorProxyClient.h" |
| +#include "core/dom/CompositorWorkerProxyClient.h" |
| +#include "platform/graphics/CompositorAnimator.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/Noncopyable.h" |
| @@ -17,27 +18,27 @@ class CompositorWorkerGlobalScope; |
| class WorkerGlobalScope; |
| // Mediates between one CompositorWorkerGlobalScope and the associated |
| -// CompositorMutatorImpl. There is one CompositorProxyClientImpl per worker |
| -// but there may be multiple for a given mutator, e.g. if a single document |
| -// creates multiple CompositorWorker objects. |
| +// CompositorMutatorImpl. There is one CompositorWorkerProxyClientImpl per |
| +// worker but there may be multiple for a given mutator, e.g. if a single |
| +// document creates multiple CompositorWorker objects. |
| // |
| // Should be accessed only on the compositor thread. |
| -class CompositorProxyClientImpl final |
| - : public GarbageCollectedFinalized<CompositorProxyClientImpl>, |
| - public CompositorProxyClient { |
| - USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl); |
| - WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl); |
| +class CompositorWorkerProxyClientImpl final |
| + : public GarbageCollectedFinalized<CompositorWorkerProxyClientImpl>, |
| + public CompositorAnimator, |
| + public CompositorWorkerProxyClient { |
| + WTF_MAKE_NONCOPYABLE(CompositorWorkerProxyClientImpl); |
| + USING_GARBAGE_COLLECTED_MIXIN(CompositorWorkerProxyClientImpl); |
| public: |
| - CompositorProxyClientImpl(CompositorMutatorImpl*); |
| - DECLARE_VIRTUAL_TRACE(); |
| + CompositorWorkerProxyClientImpl(CompositorMutatorImpl*); |
|
ikilpatrick
2016/11/28 16:43:42
explicit?
majidvp
2017/01/20 15:48:57
Done.
|
| + DECLARE_TRACE(); |
| - // Runs the animation frame callback for the frame starting at the given time. |
| - // Returns true if another animation frame was requested (i.e. should be |
| - // reinvoked next frame). |
| - bool mutate(double monotonicTimeNow, CompositorMutableStateProvider*); |
| + // CompositorAnimator: |
| + bool mutate(double monotonicTimeNow, |
| + CompositorMutableStateProvider*) override; |
| - // CompositorProxyClient: |
| + // CompositorWorkerProxyClient: |
| void dispose() override; |
| void setGlobalScope(WorkerGlobalScope*) override; |
| void requestAnimationFrame() override; |
| @@ -52,9 +53,10 @@ class CompositorProxyClientImpl final |
| CrossThreadPersistent<CompositorWorkerGlobalScope> m_globalScope; |
| bool m_requestedAnimationFrameCallbacks; |
| + // TODO(majidvp): move this out to a separate class that can be composed in. |
| HeapHashSet<WeakMember<CompositorProxy>> m_proxies; |
| }; |
| } // namespace blink |
| -#endif // CompositorProxyClientImpl_h |
| +#endif // CompositorWorkerProxyClientImpl_h |