| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | |
| 6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #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" | |
| 13 | |
| 14 namespace cc { | |
| 15 class IntRect; | |
| 16 class FloatRect; | |
| 17 } | |
| 18 | |
| 19 namespace blink { | |
| 20 class WebContentLayerClient; | |
| 21 } | |
| 22 | |
| 23 namespace content { | |
| 24 | |
| 25 class WebContentLayerImpl : public blink::WebContentLayer, | |
| 26 public cc::ContentLayerClient { | |
| 27 public: | |
| 28 CONTENT_EXPORT explicit WebContentLayerImpl( | |
| 29 blink::WebContentLayerClient*); | |
| 30 | |
| 31 // WebContentLayer implementation. | |
| 32 virtual blink::WebLayer* layer(); | |
| 33 virtual void setDoubleSided(bool double_sided); | |
| 34 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); | |
| 35 | |
| 36 protected: | |
| 37 virtual ~WebContentLayerImpl(); | |
| 38 | |
| 39 // ContentLayerClient implementation. | |
| 40 virtual void PaintContents(SkCanvas* canvas, | |
| 41 const gfx::Rect& clip, | |
| 42 gfx::RectF* opaque, | |
| 43 ContentLayerClient::GraphicsContextStatus | |
| 44 graphics_context_status) OVERRIDE; | |
| 45 virtual void DidChangeLayerCanUseLCDText() OVERRIDE; | |
| 46 virtual bool FillsBoundsCompletely() const OVERRIDE; | |
| 47 | |
| 48 scoped_ptr<WebLayerImpl> layer_; | |
| 49 blink::WebContentLayerClient* client_; | |
| 50 bool draws_content_; | |
| 51 | |
| 52 private: | |
| 53 bool can_use_lcd_text_; | |
| 54 bool ignore_lcd_text_change_; | |
| 55 | |
| 56 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); | |
| 57 }; | |
| 58 | |
| 59 } // namespace content | |
| 60 | |
| 61 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | |
| 62 | |
| OLD | NEW |