OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CompositorProxyClientImpl_h |
| 6 #define CompositorProxyClientImpl_h |
| 7 |
| 8 #include "core/dom/CompositorProxyClient.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // Registry for CompositorProxies on the control thread. |
| 13 // Owned by the control thread. |
| 14 class CompositorProxyClientImpl |
| 15 : public GarbageCollectedFinalized<CompositorProxyClientImpl>, |
| 16 public CompositorProxyClient { |
| 17 USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl); |
| 18 |
| 19 public: |
| 20 DECLARE_TRACE(); |
| 21 |
| 22 // CompositorProxyClient: |
| 23 void registerCompositorProxy(CompositorProxy*) override; |
| 24 void unregisterCompositorProxy(CompositorProxy*) override; |
| 25 |
| 26 HeapHashSet<WeakMember<CompositorProxy>>& proxies() { return m_proxies; } |
| 27 |
| 28 private: |
| 29 // CompositorProxy can be constructed in the main thread and control thread. |
| 30 // However this only ever contains ones constructed in the compositor worker |
| 31 // thread. |
| 32 HeapHashSet<WeakMember<CompositorProxy>> m_proxies; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // CompositorProxyClientImpl_h |
OLD | NEW |