Roll leveldb to r78 / 1.15.
[chromium-blink-merge.git] / webkit / renderer / compositor_bindings / web_content_layer_impl.h
blob382b580e2a2fd3ddd6c224d21f87c5615207f341
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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/layers/content_layer_client.h"
10 #include "third_party/WebKit/public/platform/WebContentLayer.h"
11 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
12 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h"
14 namespace cc {
15 class IntRect;
16 class FloatRect;
19 namespace blink { class WebContentLayerClient; }
21 namespace webkit {
23 class WebContentLayerImpl : public blink::WebContentLayer,
24 public cc::ContentLayerClient {
25 public:
26 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl(
27 blink::WebContentLayerClient*);
29 // WebContentLayer implementation.
30 virtual blink::WebLayer* layer();
31 virtual void setDoubleSided(bool double_sided);
32 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard);
34 protected:
35 virtual ~WebContentLayerImpl();
37 // ContentLayerClient implementation.
38 virtual void PaintContents(SkCanvas* canvas,
39 gfx::Rect clip,
40 gfx::RectF* opaque) OVERRIDE;
41 virtual void DidChangeLayerCanUseLCDText() OVERRIDE;
43 scoped_ptr<WebLayerImpl> layer_;
44 blink::WebContentLayerClient* client_;
45 bool draws_content_;
47 private:
48 bool can_use_lcd_text_;
49 bool ignore_lcd_text_change_;
51 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl);
54 } // namespace webkit
56 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_