| OLD | NEW |
| 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 CompositorProxy_h | 5 #ifndef CompositorProxy_h |
| 6 #define CompositorProxy_h | 6 #define CompositorProxy_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/dom/CompositorProxyClient.h" | 10 #include "core/dom/CompositorProxyClient.h" |
| 11 #include "core/dom/DOMMatrix.h" | 11 #include "core/dom/DOMMatrix.h" |
| 12 #include "core/dom/Element.h" | 12 #include "core/dom/Element.h" |
| 13 #include "platform/graphics/CompositorMutableState.h" | 13 #include "platform/graphics/CompositorMutableState.h" |
| 14 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
| 15 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class DOMMatrix; | 19 class DOMMatrix; |
| 20 class ExceptionState; | 20 class ExceptionState; |
| 21 class ExecutionContext; | 21 class ExecutionContext; |
| 22 | 22 |
| 23 class CORE_EXPORT CompositorProxy final : public GarbageCollectedFinalized<Compo
sitorProxy>, public ScriptWrappable { | 23 class CORE_EXPORT CompositorProxy final : public GarbageCollectedFinalized<Compo
sitorProxy>, public ScriptWrappable { |
| 24 DEFINE_WRAPPERTYPEINFO(); | 24 DEFINE_WRAPPERTYPEINFO(); |
| 25 public: | 25 public: |
| 26 static CompositorProxy* create(ExecutionContext*, Element*, const Vector<Str
ing>& attributeArray, ExceptionState&); | 26 static CompositorProxy* create(ExecutionContext*, Element*, const Vector<Str
ing>& attributeArray, ExceptionState&); |
| 27 static CompositorProxy* create(ExecutionContext*, uint64_t element, uint32_t
compositorMutableProperties); | 27 static CompositorProxy* create(ExecutionContext*, uint64_t element, uint32_t
compositorMutableProperties); |
| 28 virtual ~CompositorProxy(); | 28 virtual ~CompositorProxy(); |
| 29 | 29 |
| 30 DEFINE_INLINE_TRACE() | 30 DEFINE_INLINE_TRACE() { } |
| 31 { | |
| 32 visitor->trace(m_client); | |
| 33 } | |
| 34 | 31 |
| 35 uint64_t elementId() const { return m_elementId; } | 32 uint64_t elementId() const { return m_elementId; } |
| 36 uint32_t compositorMutableProperties() const { return m_compositorMutablePro
perties; } | 33 uint32_t compositorMutableProperties() const { return m_compositorMutablePro
perties; } |
| 37 bool supports(const String& attribute) const; | 34 bool supports(const String& attribute) const; |
| 38 | 35 |
| 39 bool initialized() const { return m_connected && m_state.get(); } | 36 bool initialized() const { return m_connected && m_state.get(); } |
| 40 bool connected() const { return m_connected; } | 37 bool connected() const { return m_connected; } |
| 41 void disconnect(); | 38 void disconnect(); |
| 42 | 39 |
| 43 double opacity(ExceptionState&) const; | 40 double opacity(ExceptionState&) const; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 58 CompositorProxy(uint64_t element, uint32_t compositorMutableProperties, Comp
ositorProxyClient*); | 55 CompositorProxy(uint64_t element, uint32_t compositorMutableProperties, Comp
ositorProxyClient*); |
| 59 | 56 |
| 60 private: | 57 private: |
| 61 bool raiseExceptionIfNotMutable(uint32_t compositorMutableProperty, Exceptio
nState&) const; | 58 bool raiseExceptionIfNotMutable(uint32_t compositorMutableProperty, Exceptio
nState&) const; |
| 62 void disconnectInternal(); | 59 void disconnectInternal(); |
| 63 | 60 |
| 64 const uint64_t m_elementId = 0; | 61 const uint64_t m_elementId = 0; |
| 65 const uint32_t m_compositorMutableProperties = 0; | 62 const uint32_t m_compositorMutableProperties = 0; |
| 66 | 63 |
| 67 bool m_connected = true; | 64 bool m_connected = true; |
| 68 Member<CompositorProxyClient> m_client; | 65 CrossThreadPersistent<CompositorProxyClient> m_client; |
| 69 std::unique_ptr<CompositorMutableState> m_state; | 66 std::unique_ptr<CompositorMutableState> m_state; |
| 70 }; | 67 }; |
| 71 | 68 |
| 72 } // namespace blink | 69 } // namespace blink |
| 73 | 70 |
| 74 #endif // CompositorProxy_h | 71 #endif // CompositorProxy_h |
| OLD | NEW |