| OLD | NEW |
| 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_CONTENT_LAYER_IMPL_H_ | 5 #ifndef CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ |
| 6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | 6 #define CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/blink/cc_blink_export.h" |
| 10 #include "cc/blink/web_layer_impl.h" |
| 9 #include "cc/layers/content_layer_client.h" | 11 #include "cc/layers/content_layer_client.h" |
| 10 #include "content/common/content_export.h" | |
| 11 #include "content/renderer/compositor_bindings/web_layer_impl.h" | |
| 12 #include "third_party/WebKit/public/platform/WebContentLayer.h" | 12 #include "third_party/WebKit/public/platform/WebContentLayer.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 blink { | 19 namespace blink { |
| 20 class WebContentLayerClient; | 20 class WebContentLayerClient; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace cc_blink { |
| 24 | 24 |
| 25 class WebContentLayerImpl : public blink::WebContentLayer, | 25 class WebContentLayerImpl : public blink::WebContentLayer, |
| 26 public cc::ContentLayerClient { | 26 public cc::ContentLayerClient { |
| 27 public: | 27 public: |
| 28 CONTENT_EXPORT explicit WebContentLayerImpl( | 28 CC_BLINK_EXPORT explicit WebContentLayerImpl(blink::WebContentLayerClient*); |
| 29 blink::WebContentLayerClient*); | |
| 30 | 29 |
| 31 // WebContentLayer implementation. | 30 // WebContentLayer implementation. |
| 32 virtual blink::WebLayer* layer(); | 31 virtual blink::WebLayer* layer(); |
| 33 virtual void setDoubleSided(bool double_sided); | 32 virtual void setDoubleSided(bool double_sided); |
| 34 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); | 33 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); |
| 35 | 34 |
| 36 protected: | 35 protected: |
| 37 virtual ~WebContentLayerImpl(); | 36 virtual ~WebContentLayerImpl(); |
| 38 | 37 |
| 39 // ContentLayerClient implementation. | 38 // ContentLayerClient implementation. |
| 40 virtual void PaintContents(SkCanvas* canvas, | 39 virtual void PaintContents(SkCanvas* canvas, |
| 41 const gfx::Rect& clip, | 40 const gfx::Rect& clip, |
| 42 gfx::RectF* opaque, | 41 gfx::RectF* opaque, |
| 43 ContentLayerClient::GraphicsContextStatus | 42 ContentLayerClient::GraphicsContextStatus |
| 44 graphics_context_status) OVERRIDE; | 43 graphics_context_status) OVERRIDE; |
| 45 virtual void DidChangeLayerCanUseLCDText() OVERRIDE; | 44 virtual void DidChangeLayerCanUseLCDText() OVERRIDE; |
| 46 virtual bool FillsBoundsCompletely() const OVERRIDE; | 45 virtual bool FillsBoundsCompletely() const OVERRIDE; |
| 47 | 46 |
| 48 scoped_ptr<WebLayerImpl> layer_; | 47 scoped_ptr<WebLayerImpl> layer_; |
| 49 blink::WebContentLayerClient* client_; | 48 blink::WebContentLayerClient* client_; |
| 50 bool draws_content_; | 49 bool draws_content_; |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 bool can_use_lcd_text_; | 52 bool can_use_lcd_text_; |
| 54 bool ignore_lcd_text_change_; | 53 bool ignore_lcd_text_change_; |
| 55 | 54 |
| 56 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); | 55 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // namespace content | 58 } // namespace cc_blink |
| 60 | 59 |
| 61 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | 60 #endif // CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ |
| 62 | |
| OLD | NEW |