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

Side by Side Diff: content/renderer/compositor_bindings/web_layer_impl.h

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using layouttest_support to instantiate WebLayer Created 6 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_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/layers/layer_client.h" 12 #include "cc/layers/layer_client.h"
13 #include "content/common/content_export.h"
13 #include "third_party/WebKit/public/platform/WebAnimation.h" 14 #include "third_party/WebKit/public/platform/WebAnimation.h"
14 #include "third_party/WebKit/public/platform/WebCString.h" 15 #include "third_party/WebKit/public/platform/WebCString.h"
15 #include "third_party/WebKit/public/platform/WebColor.h" 16 #include "third_party/WebKit/public/platform/WebColor.h"
16 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 17 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
17 #include "third_party/WebKit/public/platform/WebLayer.h" 18 #include "third_party/WebKit/public/platform/WebLayer.h"
18 #include "third_party/WebKit/public/platform/WebPoint.h" 19 #include "third_party/WebKit/public/platform/WebPoint.h"
19 #include "third_party/WebKit/public/platform/WebRect.h" 20 #include "third_party/WebKit/public/platform/WebRect.h"
20 #include "third_party/WebKit/public/platform/WebSize.h" 21 #include "third_party/WebKit/public/platform/WebSize.h"
21 #include "third_party/WebKit/public/platform/WebString.h" 22 #include "third_party/WebKit/public/platform/WebString.h"
22 #include "third_party/WebKit/public/platform/WebVector.h" 23 #include "third_party/WebKit/public/platform/WebVector.h"
23 #include "third_party/skia/include/utils/SkMatrix44.h" 24 #include "third_party/skia/include/utils/SkMatrix44.h"
24 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h"
25 25
26 namespace cc { class Layer; } 26 namespace cc {
27 class Layer;
28 }
27 29
28 namespace blink { 30 namespace blink {
29 class WebFilterOperations; 31 class WebFilterOperations;
30 class WebLayerClient; 32 class WebLayerClient;
31 struct WebFloatRect; 33 struct WebFloatRect;
32 } 34 }
33 35
34 namespace base { 36 namespace base {
35 namespace debug { 37 namespace debug {
36 class ConvertableToTraceFormat; 38 class ConvertableToTraceFormat;
37 } 39 }
38 } 40 }
39 41
40 namespace webkit { 42 namespace content {
41 43
42 class WebToCCAnimationDelegateAdapter; 44 class WebToCCAnimationDelegateAdapter;
43 45
44 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { 46 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient {
45 public: 47 public:
46 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerImpl(); 48 CONTENT_EXPORT WebLayerImpl();
47 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerImpl( 49 CONTENT_EXPORT explicit WebLayerImpl(
48 scoped_refptr<cc::Layer>); 50 scoped_refptr<cc::Layer>);
49 virtual ~WebLayerImpl(); 51 virtual ~WebLayerImpl();
50 52
51 static bool UsingPictureLayer(); 53 static bool UsingPictureLayer();
52 WEBKIT_COMPOSITOR_BINDINGS_EXPORT static void SetImplSidePaintingEnabled( 54 CONTENT_EXPORT static void SetImplSidePaintingEnabled(
53 bool enabled); 55 bool enabled);
54 56
55 WEBKIT_COMPOSITOR_BINDINGS_EXPORT cc::Layer* layer() const; 57 CONTENT_EXPORT cc::Layer* layer() const;
56 58
57 // WebLayer implementation. 59 // WebLayer implementation.
58 virtual int id() const; 60 virtual int id() const;
59 virtual void invalidateRect(const blink::WebFloatRect&); 61 virtual void invalidateRect(const blink::WebFloatRect&);
60 virtual void invalidate(); 62 virtual void invalidate();
61 virtual void addChild(blink::WebLayer* child); 63 virtual void addChild(blink::WebLayer* child);
62 virtual void insertChild(blink::WebLayer* child, size_t index); 64 virtual void insertChild(blink::WebLayer* child, size_t index);
63 virtual void replaceChild(blink::WebLayer* reference, 65 virtual void replaceChild(blink::WebLayer* reference,
64 blink::WebLayer* new_layer); 66 blink::WebLayer* new_layer);
65 virtual void removeFromParent(); 67 virtual void removeFromParent();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void setIsContainerForFixedPositionLayers(bool is_container); 127 virtual void setIsContainerForFixedPositionLayers(bool is_container);
126 virtual bool isContainerForFixedPositionLayers() const; 128 virtual bool isContainerForFixedPositionLayers() const;
127 virtual void setPositionConstraint( 129 virtual void setPositionConstraint(
128 const blink::WebLayerPositionConstraint& constraint); 130 const blink::WebLayerPositionConstraint& constraint);
129 virtual blink::WebLayerPositionConstraint positionConstraint() const; 131 virtual blink::WebLayerPositionConstraint positionConstraint() const;
130 virtual void setScrollClient(blink::WebLayerScrollClient* client); 132 virtual void setScrollClient(blink::WebLayerScrollClient* client);
131 virtual bool isOrphan() const; 133 virtual bool isOrphan() const;
132 virtual void setWebLayerClient(blink::WebLayerClient* client); 134 virtual void setWebLayerClient(blink::WebLayerClient* client);
133 135
134 // LayerClient implementation. 136 // LayerClient implementation.
135 virtual scoped_refptr<base::debug::ConvertableToTraceFormat> 137 virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo()
136 TakeDebugInfo() OVERRIDE; 138 OVERRIDE;
jam 2014/06/11 00:27:04 ditto
137 139
138 virtual void setScrollParent(blink::WebLayer* parent); 140 virtual void setScrollParent(blink::WebLayer* parent);
139 virtual void setClipParent(blink::WebLayer* parent); 141 virtual void setClipParent(blink::WebLayer* parent);
140 142
141 protected: 143 protected:
142 scoped_refptr<cc::Layer> layer_; 144 scoped_refptr<cc::Layer> layer_;
143 blink::WebLayerClient* web_layer_client_; 145 blink::WebLayerClient* web_layer_client_;
144 146
145 private: 147 private:
146 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; 148 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_;
147 149
148 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); 150 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl);
149 }; 151 };
150 152
151 } // namespace webkit 153 } // namespace content
152 154
153 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ 155 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698