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

Side by Side Diff: cc/blink/web_layer_impl.h

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/blink/web_image_layer_impl.cc ('k') | cc/blink/web_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 5 #ifndef CC_BLINK_WEB_LAYER_IMPL_H_
6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 6 #define CC_BLINK_WEB_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/blink/cc_blink_export.h"
12 #include "cc/layers/layer_client.h" 13 #include "cc/layers/layer_client.h"
13 #include "content/common/content_export.h"
14 #include "third_party/WebKit/public/platform/WebCString.h" 14 #include "third_party/WebKit/public/platform/WebCString.h"
15 #include "third_party/WebKit/public/platform/WebColor.h" 15 #include "third_party/WebKit/public/platform/WebColor.h"
16 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" 16 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h"
17 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 17 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
18 #include "third_party/WebKit/public/platform/WebLayer.h" 18 #include "third_party/WebKit/public/platform/WebLayer.h"
19 #include "third_party/WebKit/public/platform/WebPoint.h" 19 #include "third_party/WebKit/public/platform/WebPoint.h"
20 #include "third_party/WebKit/public/platform/WebRect.h" 20 #include "third_party/WebKit/public/platform/WebRect.h"
21 #include "third_party/WebKit/public/platform/WebSize.h" 21 #include "third_party/WebKit/public/platform/WebSize.h"
22 #include "third_party/WebKit/public/platform/WebString.h" 22 #include "third_party/WebKit/public/platform/WebString.h"
23 #include "third_party/WebKit/public/platform/WebVector.h" 23 #include "third_party/WebKit/public/platform/WebVector.h"
24 #include "third_party/skia/include/utils/SkMatrix44.h" 24 #include "third_party/skia/include/utils/SkMatrix44.h"
25 25
26 namespace cc {
27 class Layer;
28 }
29
30 namespace blink { 26 namespace blink {
31 class WebFilterOperations; 27 class WebFilterOperations;
32 class WebLayerClient; 28 class WebLayerClient;
33 struct WebFloatRect; 29 struct WebFloatRect;
34 } 30 }
35 31
36 namespace base { 32 namespace base {
37 namespace debug { 33 namespace debug {
38 class ConvertableToTraceFormat; 34 class ConvertableToTraceFormat;
39 } 35 }
40 } 36 }
41 37
42 namespace content { 38 namespace cc {
39 class Layer;
40 }
41
42 namespace cc_blink {
43 43
44 class WebToCCAnimationDelegateAdapter; 44 class WebToCCAnimationDelegateAdapter;
45 45
46 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { 46 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient {
47 public: 47 public:
48 CONTENT_EXPORT WebLayerImpl(); 48 CC_BLINK_EXPORT WebLayerImpl();
49 CONTENT_EXPORT explicit WebLayerImpl( 49 CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>);
50 scoped_refptr<cc::Layer>);
51 virtual ~WebLayerImpl(); 50 virtual ~WebLayerImpl();
52 51
53 static bool UsingPictureLayer(); 52 static bool UsingPictureLayer();
54 CONTENT_EXPORT static void SetImplSidePaintingEnabled( 53 CC_BLINK_EXPORT static void SetImplSidePaintingEnabled(bool enabled);
55 bool enabled);
56 54
57 CONTENT_EXPORT cc::Layer* layer() const; 55 CC_BLINK_EXPORT cc::Layer* layer() const;
58 56
59 // WebLayer implementation. 57 // WebLayer implementation.
60 virtual int id() const; 58 virtual int id() const;
61 virtual void invalidateRect(const blink::WebFloatRect&); 59 virtual void invalidateRect(const blink::WebFloatRect&);
62 virtual void invalidate(); 60 virtual void invalidate();
63 virtual void addChild(blink::WebLayer* child); 61 virtual void addChild(blink::WebLayer* child);
64 virtual void insertChild(blink::WebLayer* child, size_t index); 62 virtual void insertChild(blink::WebLayer* child, size_t index);
65 virtual void replaceChild(blink::WebLayer* reference, 63 virtual void replaceChild(blink::WebLayer* reference,
66 blink::WebLayer* new_layer); 64 blink::WebLayer* new_layer);
67 virtual void removeFromParent(); 65 virtual void removeFromParent();
(...skipping 10 matching lines...) Expand all
78 virtual blink::WebBlendMode blendMode() const; 76 virtual blink::WebBlendMode blendMode() const;
79 virtual void setIsRootForIsolatedGroup(bool root); 77 virtual void setIsRootForIsolatedGroup(bool root);
80 virtual bool isRootForIsolatedGroup(); 78 virtual bool isRootForIsolatedGroup();
81 virtual void setOpaque(bool opaque); 79 virtual void setOpaque(bool opaque);
82 virtual bool opaque() const; 80 virtual bool opaque() const;
83 virtual void setPosition(const blink::WebFloatPoint& position); 81 virtual void setPosition(const blink::WebFloatPoint& position);
84 virtual blink::WebFloatPoint position() const; 82 virtual blink::WebFloatPoint position() const;
85 virtual void setTransform(const SkMatrix44& transform); 83 virtual void setTransform(const SkMatrix44& transform);
86 virtual void setTransformOrigin(const blink::WebFloatPoint3D& point); 84 virtual void setTransformOrigin(const blink::WebFloatPoint3D& point);
87 virtual blink::WebFloatPoint3D transformOrigin() const; 85 virtual blink::WebFloatPoint3D transformOrigin() const;
88
89 // FIXME: get rid of these once Blink is no longer using them.
90 virtual void setAnchorPoint(const blink::WebFloatPoint&);
91 virtual blink::WebFloatPoint anchorPoint() const;
92 virtual void setAnchorPointZ(float);
93 virtual float anchorPointZ() const;
94
95 virtual SkMatrix44 transform() const; 86 virtual SkMatrix44 transform() const;
96 virtual void setDrawsContent(bool draws_content); 87 virtual void setDrawsContent(bool draws_content);
97 virtual bool drawsContent() const; 88 virtual bool drawsContent() const;
98 virtual void setShouldFlattenTransform(bool flatten); 89 virtual void setShouldFlattenTransform(bool flatten);
99 virtual void setRenderingContext(int context); 90 virtual void setRenderingContext(int context);
100 virtual void setUseParentBackfaceVisibility(bool visible); 91 virtual void setUseParentBackfaceVisibility(bool visible);
101 virtual void setBackgroundColor(blink::WebColor color); 92 virtual void setBackgroundColor(blink::WebColor color);
102 virtual blink::WebColor backgroundColor() const; 93 virtual blink::WebColor backgroundColor() const;
103 virtual void setFilters(const blink::WebFilterOperations& filters); 94 virtual void setFilters(const blink::WebFilterOperations& filters);
104 virtual void setBackgroundFilters(const blink::WebFilterOperations& filters); 95 virtual void setBackgroundFilters(const blink::WebFilterOperations& filters);
(...skipping 28 matching lines...) Expand all
133 virtual void setIsContainerForFixedPositionLayers(bool is_container); 124 virtual void setIsContainerForFixedPositionLayers(bool is_container);
134 virtual bool isContainerForFixedPositionLayers() const; 125 virtual bool isContainerForFixedPositionLayers() const;
135 virtual void setPositionConstraint( 126 virtual void setPositionConstraint(
136 const blink::WebLayerPositionConstraint& constraint); 127 const blink::WebLayerPositionConstraint& constraint);
137 virtual blink::WebLayerPositionConstraint positionConstraint() const; 128 virtual blink::WebLayerPositionConstraint positionConstraint() const;
138 virtual void setScrollClient(blink::WebLayerScrollClient* client); 129 virtual void setScrollClient(blink::WebLayerScrollClient* client);
139 virtual bool isOrphan() const; 130 virtual bool isOrphan() const;
140 virtual void setWebLayerClient(blink::WebLayerClient* client); 131 virtual void setWebLayerClient(blink::WebLayerClient* client);
141 132
142 // LayerClient implementation. 133 // LayerClient implementation.
143 virtual scoped_refptr<base::debug::ConvertableToTraceFormat> 134 virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo()
144 TakeDebugInfo() OVERRIDE; 135 OVERRIDE;
145 136
146 virtual void setScrollParent(blink::WebLayer* parent); 137 virtual void setScrollParent(blink::WebLayer* parent);
147 virtual void setClipParent(blink::WebLayer* parent); 138 virtual void setClipParent(blink::WebLayer* parent);
148 139
149 protected: 140 protected:
150 scoped_refptr<cc::Layer> layer_; 141 scoped_refptr<cc::Layer> layer_;
151 blink::WebLayerClient* web_layer_client_; 142 blink::WebLayerClient* web_layer_client_;
152 143
153 private: 144 private:
154 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; 145 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_;
155 146
156 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); 147 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl);
157 }; 148 };
158 149
159 } // namespace content 150 } // namespace cc_blink
160 151
161 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 152 #endif // CC_BLINK_WEB_LAYER_IMPL_H_
162
OLDNEW
« no previous file with comments | « cc/blink/web_image_layer_impl.cc ('k') | cc/blink/web_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698