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

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

Issue 2765053002: Avoid exposing cc::Layer tree to CompositorProxy (Closed)
Patch Set: Rebase onto blink reformat Created 3 years, 8 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" 9 #include "core/CoreExport.h"
10 #include "core/dom/CompositorProxyClient.h" 10 #include "core/dom/CompositorProxyClient.h"
(...skipping 21 matching lines...) Expand all
32 const Vector<String>& attribute_array, 32 const Vector<String>& attribute_array,
33 ExceptionState&); 33 ExceptionState&);
34 static CompositorProxy* Create(ExecutionContext*, 34 static CompositorProxy* Create(ExecutionContext*,
35 uint64_t element, 35 uint64_t element,
36 uint32_t compositor_mutable_properties); 36 uint32_t compositor_mutable_properties);
37 virtual ~CompositorProxy(); 37 virtual ~CompositorProxy();
38 38
39 DECLARE_TRACE(); 39 DECLARE_TRACE();
40 40
41 uint64_t ElementId() const { return element_id_; } 41 uint64_t ElementId() const { return element_id_; }
42 uint64_t ProxyId() const { return proxy_id_; }
42 uint32_t CompositorMutableProperties() const { 43 uint32_t CompositorMutableProperties() const {
43 return compositor_mutable_properties_; 44 return compositor_mutable_properties_;
44 } 45 }
45 bool supports(const String& attribute) const; 46 bool supports(const String& attribute) const;
46 47
47 bool initialized() const { return connected_ && state_.get(); } 48 bool initialized() const { return connected_ && state_.get(); }
48 bool Connected() const { return connected_; } 49 bool Connected() const { return connected_; }
49 void disconnect(); 50 void disconnect();
50 51
51 double opacity(ExceptionState&) const; 52 double opacity(ExceptionState&) const;
(...skipping 13 matching lines...) Expand all
65 CompositorProxy(Element&, const Vector<String>& attribute_array); 66 CompositorProxy(Element&, const Vector<String>& attribute_array);
66 CompositorProxy(uint64_t element, 67 CompositorProxy(uint64_t element,
67 uint32_t compositor_mutable_properties, 68 uint32_t compositor_mutable_properties,
68 CompositorProxyClient*); 69 CompositorProxyClient*);
69 70
70 private: 71 private:
71 bool RaiseExceptionIfNotMutable(uint32_t compositor_mutable_property, 72 bool RaiseExceptionIfNotMutable(uint32_t compositor_mutable_property,
72 ExceptionState&) const; 73 ExceptionState&) const;
73 void DisconnectInternal(); 74 void DisconnectInternal();
74 75
76 const uint64_t proxy_id_ = 0;
75 const uint64_t element_id_ = 0; 77 const uint64_t element_id_ = 0;
76 const uint32_t compositor_mutable_properties_ = 0; 78 const uint32_t compositor_mutable_properties_ = 0;
77 79
78 bool connected_ = true; 80 bool connected_ = true;
79 Member<CompositorProxyClient> client_; 81 Member<CompositorProxyClient> client_;
80 std::unique_ptr<CompositorMutableState> state_; 82 std::unique_ptr<CompositorMutableState> state_;
81 }; 83 };
82 84
83 } // namespace blink 85 } // namespace blink
84 86
85 #endif // CompositorProxy_h 87 #endif // CompositorProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698