| 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 WEBKIT_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ |
| 6 #define WebContentLayerImpl_h | 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_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 { class WebContentLayerClient; } |
| 20 class WebContentLayerClient; | |
| 21 | 20 |
| 22 class WebContentLayerImpl : public WebContentLayer, | 21 namespace webkit { |
| 22 |
| 23 class WebContentLayerImpl : public WebKit::WebContentLayer, |
| 23 public cc::ContentLayerClient { | 24 public cc::ContentLayerClient { |
| 24 public: | 25 public: |
| 25 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( | 26 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( |
| 26 WebContentLayerClient*); | 27 WebKit::WebContentLayerClient*); |
| 27 | 28 |
| 28 // WebContentLayer implementation. | 29 // WebContentLayer implementation. |
| 29 virtual WebLayer* layer(); | 30 virtual WebKit::WebLayer* layer(); |
| 30 virtual void setDoubleSided(bool); | 31 virtual void setDoubleSided(bool double_sided); |
| 31 virtual void setBoundsContainPageScale(bool); | 32 virtual void setBoundsContainPageScale(bool contains); |
| 32 virtual bool boundsContainPageScale() const; | 33 virtual bool boundsContainPageScale() const; |
| 33 virtual void setUseLCDText(bool); | 34 virtual void setUseLCDText(bool use_lcd_text); |
| 34 virtual void setDrawCheckerboardForMissingTiles(bool); | 35 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); |
| 35 virtual void setAutomaticallyComputeRasterScale(bool); | 36 virtual void setAutomaticallyComputeRasterScale(bool compute_raster); |
| 36 | 37 |
| 37 protected: | 38 protected: |
| 38 virtual ~WebContentLayerImpl(); | 39 virtual ~WebContentLayerImpl(); |
| 39 | 40 |
| 40 // ContentLayerClient implementation. | 41 // ContentLayerClient implementation. |
| 41 virtual void PaintContents(SkCanvas* canvas, | 42 virtual void PaintContents(SkCanvas* canvas, |
| 42 gfx::Rect clip, | 43 gfx::Rect clip, |
| 43 gfx::RectF* opaque) OVERRIDE; | 44 gfx::RectF* opaque) OVERRIDE; |
| 44 | 45 |
| 45 scoped_ptr<WebLayerImpl> layer_; | 46 scoped_ptr<WebLayerImpl> layer_; |
| 46 WebContentLayerClient* client_; | 47 WebKit::WebContentLayerClient* client_; |
| 47 bool draws_content_; | 48 bool draws_content_; |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 } // namespace WebKit | 51 } // namespace webkit |
| 51 | 52 |
| 52 #endif // WebContentLayerImpl_h | 53 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ |
| OLD | NEW |