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

Side by Side Diff: third_party/WebKit/Source/core/dom/CompositorProxy.h

Issue 1900423004: [compositorworker] Register compositor proxies with proxy client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 4 years, 6 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 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"
10 #include "core/dom/CompositorProxyClient.h"
9 #include "core/dom/DOMMatrix.h" 11 #include "core/dom/DOMMatrix.h"
10 #include "core/dom/Element.h" 12 #include "core/dom/Element.h"
11 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
12 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
13 15
14 namespace blink { 16 namespace blink {
15 17
16 class DOMMatrix; 18 class DOMMatrix;
17 class ExceptionState; 19 class ExceptionState;
18 class ExecutionContext; 20 class ExecutionContext;
19 21
20 class CompositorProxy final : public GarbageCollectedFinalized<CompositorProxy>, public ScriptWrappable { 22 class CORE_EXPORT CompositorProxy final : public GarbageCollectedFinalized<Compo sitorProxy>, public ScriptWrappable {
21 DEFINE_WRAPPERTYPEINFO(); 23 DEFINE_WRAPPERTYPEINFO();
22 public: 24 public:
23 static CompositorProxy* create(ExecutionContext*, Element*, const Vector<Str ing>& attributeArray, ExceptionState&); 25 static CompositorProxy* create(ExecutionContext*, Element*, const Vector<Str ing>& attributeArray, ExceptionState&);
24 static CompositorProxy* create(uint64_t element, uint32_t compositorMutableP roperties); 26 static CompositorProxy* create(ExecutionContext*, uint64_t element, uint32_t compositorMutableProperties);
25 virtual ~CompositorProxy(); 27 virtual ~CompositorProxy();
26 28
27 DEFINE_INLINE_TRACE() 29 DEFINE_INLINE_TRACE()
28 { 30 {
29 visitor->trace(m_transform); 31 visitor->trace(m_transform);
32 visitor->trace(m_client);
30 } 33 }
31 34
32 uint64_t elementId() const { return m_elementId; } 35 uint64_t elementId() const { return m_elementId; }
33 uint32_t compositorMutableProperties() const { return m_compositorMutablePro perties; } 36 uint32_t compositorMutableProperties() const { return m_compositorMutablePro perties; }
34 bool supports(const String& attribute) const; 37 bool supports(const String& attribute) const;
35 38
36 bool connected() const { return m_connected; } 39 bool connected() const { return m_connected; }
37 void disconnect(); 40 void disconnect();
38 41
39 double opacity(ExceptionState&) const; 42 double opacity(ExceptionState&) const;
40 double scrollLeft(ExceptionState&) const; 43 double scrollLeft(ExceptionState&) const;
41 double scrollTop(ExceptionState&) const; 44 double scrollTop(ExceptionState&) const;
42 DOMMatrix* transform(ExceptionState&) const; 45 DOMMatrix* transform(ExceptionState&) const;
43 46
44 void setOpacity(double, ExceptionState&); 47 void setOpacity(double, ExceptionState&);
45 void setScrollLeft(double, ExceptionState&); 48 void setScrollLeft(double, ExceptionState&);
46 void setScrollTop(double, ExceptionState&); 49 void setScrollTop(double, ExceptionState&);
47 void setTransform(DOMMatrix*, ExceptionState&); 50 void setTransform(DOMMatrix*, ExceptionState&);
48 51
49 protected: 52 protected:
53 CompositorProxy(uint64_t elementId, uint32_t compositorMutableProperties);
50 CompositorProxy(Element&, const Vector<String>& attributeArray); 54 CompositorProxy(Element&, const Vector<String>& attributeArray);
51 CompositorProxy(uint64_t element, uint32_t compositorMutableProperties); 55 CompositorProxy(uint64_t element, uint32_t compositorMutableProperties, Comp ositorProxyClient*);
52 56
53 private: 57 private:
54 bool raiseExceptionIfNotMutable(uint32_t compositorMutableProperty, Exceptio nState&) const; 58 bool raiseExceptionIfNotMutable(uint32_t compositorMutableProperty, Exceptio nState&) const;
59 void disconnectInternal();
55 60
56 const uint64_t m_elementId = 0; 61 const uint64_t m_elementId = 0;
57 const uint32_t m_compositorMutableProperties = 0; 62 const uint32_t m_compositorMutableProperties = 0;
58 uint32_t m_mutatedProperties = 0; 63 uint32_t m_mutatedProperties = 0;
59 64
60 double m_opacity = 0; 65 double m_opacity = 0;
61 double m_scrollLeft = 0; 66 double m_scrollLeft = 0;
62 double m_scrollTop = 0; 67 double m_scrollTop = 0;
63 Member<DOMMatrix> m_transform; 68 Member<DOMMatrix> m_transform;
64 69
65 bool m_connected = true; 70 bool m_connected = true;
71 Member<CompositorProxyClient> m_client;
66 }; 72 };
67 73
68 } // namespace blink 74 } // namespace blink
69 75
70 #endif // CompositorProxy_h 76 #endif // CompositorProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698