| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 protected: | 148 protected: |
| 147 scoped_refptr<cc::Layer> layer_; | 149 scoped_refptr<cc::Layer> layer_; |
| 148 blink::WebLayerClient* web_layer_client_; | 150 blink::WebLayerClient* web_layer_client_; |
| 149 | 151 |
| 150 private: | 152 private: |
| 151 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | 153 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; |
| 152 | 154 |
| 153 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); | 155 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 } // namespace webkit | 158 } // namespace content |
| 157 | 159 |
| 158 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ | 160 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ |
| 161 |
| OLD | NEW |