OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebMutatorImpl_h |
| 6 #define WebMutatorImpl_h |
| 7 |
| 8 #include "public/platform/WebMutation.h" |
| 9 #include "public/platform/WebMutator.h" |
| 10 #include "wtf/HashSet.h" |
| 11 #include "wtf/Noncopyable.h" |
| 12 #include "wtf/OwnPtr.h" |
| 13 #include "wtf/PassOwnPtr.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class CompositorProxy; |
| 18 class CompositorProxyClient; |
| 19 class CompositorProxyClientImpl; |
| 20 class CompositorWorkerGlobalScope; |
| 21 class WebMutatorClient; |
| 22 class WebWaitableEvent; |
| 23 |
| 24 class BLINK_EXPORT WebMutatorImpl final : public WebMutator { |
| 25 WTF_MAKE_NONCOPYABLE(WebMutatorImpl); |
| 26 |
| 27 public: |
| 28 static PassOwnPtr<WebMutatorImpl> create(); |
| 29 ~WebMutatorImpl() override; |
| 30 |
| 31 // WebMutator implementation. |
| 32 bool mutate(double timeNow, WebCompositorMutableStateProvider*) override; |
| 33 |
| 34 void registerClient(CompositorProxyClientImpl*); |
| 35 void unregisterClient(CompositorProxyClientImpl*); |
| 36 |
| 37 CompositorProxyClient* createCompositorProxyClient(); |
| 38 WebMutatorClient* client() { return m_client.get(); } |
| 39 |
| 40 void setNeedsMutate(); |
| 41 |
| 42 private: |
| 43 WebMutatorImpl(); |
| 44 |
| 45 typedef HashSet<CompositorProxyClientImpl*> Clients; |
| 46 Clients m_clients; |
| 47 |
| 48 OwnPtr<WebMutatorClient> m_client; |
| 49 }; |
| 50 |
| 51 } // namespace blink |
| 52 |
| 53 #endif // WebMutatorImpl_h |
OLD | NEW |