| 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 WebContentLayerImpl_h | 5 #ifndef WebContentLayerImpl_h |
| 6 #define WebContentLayerImpl_h | 6 #define WebContentLayerImpl_h |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/content_layer_client.h" | 9 #include "cc/content_layer_client.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayer.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayer.h" |
| 11 #include "webkit/compositor_bindings/web_layer_impl.h" | 11 #include "webkit/compositor_bindings/web_layer_impl.h" |
| 12 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 12 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class IntRect; | 15 class IntRect; |
| 16 class FloatRect; | 16 class FloatRect; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace WebKit { | 19 namespace WebKit { |
| 20 class WebContentLayerClient; | 20 class WebContentLayerClient; |
| 21 | 21 |
| 22 class WebContentLayerImpl : public WebContentLayer, | 22 class WebContentLayerImpl : public WebContentLayer, |
| 23 public cc::ContentLayerClient { | 23 public cc::ContentLayerClient { |
| 24 public: | 24 public: |
| 25 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( | 25 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( |
| 26 WebContentLayerClient*); | 26 WebContentLayerClient*); |
| 27 | 27 |
| 28 // WebContentLayer implementation. | 28 // WebContentLayer implementation. |
| 29 virtual WebLayer* layer() OVERRIDE; | 29 virtual WebLayer* layer(); |
| 30 virtual void setDoubleSided(bool) OVERRIDE; | 30 virtual void setDoubleSided(bool); |
| 31 virtual void setBoundsContainPageScale(bool) OVERRIDE; | 31 virtual void setBoundsContainPageScale(bool); |
| 32 virtual bool boundsContainPageScale() const OVERRIDE; | 32 virtual bool boundsContainPageScale() const; |
| 33 virtual void setUseLCDText(bool) OVERRIDE; | 33 virtual void setUseLCDText(bool); |
| 34 virtual void setDrawCheckerboardForMissingTiles(bool) OVERRIDE; | 34 virtual void setDrawCheckerboardForMissingTiles(bool); |
| 35 virtual void setAutomaticallyComputeRasterScale(bool); | 35 virtual void setAutomaticallyComputeRasterScale(bool); |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 virtual ~WebContentLayerImpl(); | 38 virtual ~WebContentLayerImpl(); |
| 39 | 39 |
| 40 // ContentLayerClient implementation. | 40 // ContentLayerClient implementation. |
| 41 virtual void paintContents(SkCanvas*, | 41 virtual void paintContents(SkCanvas*, |
| 42 const gfx::Rect& clip, | 42 const gfx::Rect& clip, |
| 43 gfx::RectF& opaque) OVERRIDE; | 43 gfx::RectF& opaque) OVERRIDE; |
| 44 | 44 |
| 45 scoped_ptr<WebLayerImpl> layer_; | 45 scoped_ptr<WebLayerImpl> layer_; |
| 46 WebContentLayerClient* client_; | 46 WebContentLayerClient* client_; |
| 47 bool draws_content_; | 47 bool draws_content_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace WebKit | 50 } // namespace WebKit |
| 51 | 51 |
| 52 #endif // WebContentLayerImpl_h | 52 #endif // WebContentLayerImpl_h |
| OLD | NEW |