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 WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | 5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ |
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | 6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | |
9 | |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "cc/layers/content_layer_client.h" | 11 #include "cc/layers/content_layer_client.h" |
10 #include "third_party/WebKit/public/platform/WebContentLayer.h" | 12 #include "third_party/WebKit/public/platform/WebContentLayer.h" |
11 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 13 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
12 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h" | 14 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h" |
13 | 15 |
14 namespace cc { | 16 namespace cc { |
15 class IntRect; | 17 class IntRect; |
16 class FloatRect; | 18 class FloatRect; |
17 } | 19 } |
18 | 20 |
19 namespace WebKit { class WebContentLayerClient; } | 21 namespace WebKit { class WebContentLayerClient; } |
20 | 22 |
21 namespace webkit { | 23 namespace webkit { |
22 | 24 |
23 class WebContentLayerImpl : public WebKit::WebContentLayer, | 25 class WebContentLayerImpl : public WebKit::WebContentLayer, |
24 public cc::ContentLayerClient { | 26 public cc::ContentLayerClient { |
25 public: | 27 public: |
26 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( | 28 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebContentLayerImpl( |
27 WebKit::WebContentLayerClient*); | 29 WebKit::WebContentLayerClient*); |
28 | 30 |
29 // WebContentLayer implementation. | 31 // WebContentLayer implementation. |
30 virtual WebKit::WebLayer* layer(); | 32 virtual WebKit::WebLayer* layer(); |
31 virtual void setDoubleSided(bool double_sided); | 33 virtual void setDoubleSided(bool double_sided); |
32 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); | 34 virtual void setDrawCheckerboardForMissingTiles(bool checkerboard); |
35 std::string DebugName(); | |
enne (OOO)
2013/07/03 17:40:43
Is there a reason this is on WebContentLayer and n
qiankun
2013/07/04 04:34:04
That's due to WebContentLayer is passed as Content
enne (OOO)
2013/07/09 20:15:32
I don't think WebLayer not having a client is a re
qiankun
2013/07/10 04:53:07
It seems part of WebLayer's behavior is a bridge b
enne (OOO)
2013/07/10 16:48:42
WebContentLayer is a logical extension of WebLayer
| |
33 | 36 |
34 protected: | 37 protected: |
35 virtual ~WebContentLayerImpl(); | 38 virtual ~WebContentLayerImpl(); |
36 | 39 |
37 // ContentLayerClient implementation. | 40 // ContentLayerClient implementation. |
38 virtual void PaintContents(SkCanvas* canvas, | 41 virtual void PaintContents(SkCanvas* canvas, |
39 gfx::Rect clip, | 42 gfx::Rect clip, |
40 gfx::RectF* opaque) OVERRIDE; | 43 gfx::RectF* opaque) OVERRIDE; |
41 virtual void DidChangeLayerCanUseLCDText() OVERRIDE; | 44 virtual void DidChangeLayerCanUseLCDText() OVERRIDE; |
42 | 45 |
43 scoped_ptr<WebLayerImpl> layer_; | 46 scoped_ptr<WebLayerImpl> layer_; |
44 WebKit::WebContentLayerClient* client_; | 47 WebKit::WebContentLayerClient* client_; |
45 bool draws_content_; | 48 bool draws_content_; |
46 | 49 |
47 private: | 50 private: |
48 bool can_use_lcd_text_; | 51 bool can_use_lcd_text_; |
49 bool ignore_lcd_text_change_; | 52 bool ignore_lcd_text_change_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); | 54 DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); |
52 }; | 55 }; |
53 | 56 |
54 } // namespace webkit | 57 } // namespace webkit |
55 | 58 |
56 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ | 59 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ |
OLD | NEW |