OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "web_solid_color_layer_impl.h" | 5 #include "web_solid_color_layer_impl.h" |
6 | 6 |
7 #include "cc/solid_color_layer.h" | 7 #include "cc/solid_color_layer.h" |
8 #include "web_layer_impl.h" | 8 #include "web_layer_impl.h" |
9 | 9 |
10 using cc::SolidColorLayer; | 10 using cc::SolidColorLayer; |
11 | 11 |
12 namespace WebKit { | 12 namespace WebKit { |
13 | 13 |
14 WebSolidColorLayer* WebSolidColorLayer::create() | |
15 { | |
16 return new WebSolidColorLayerImpl(); | |
17 } | |
18 | |
19 WebSolidColorLayerImpl::WebSolidColorLayerImpl() | 14 WebSolidColorLayerImpl::WebSolidColorLayerImpl() |
20 : m_layer(new WebLayerImpl(SolidColorLayer::create())) | 15 : m_layer(new WebLayerImpl(SolidColorLayer::create())) |
21 { | 16 { |
22 m_layer->layer()->setIsDrawable(true); | 17 m_layer->layer()->setIsDrawable(true); |
23 } | 18 } |
24 | 19 |
25 WebSolidColorLayerImpl::~WebSolidColorLayerImpl() | 20 WebSolidColorLayerImpl::~WebSolidColorLayerImpl() |
26 { | 21 { |
27 } | 22 } |
28 | 23 |
29 WebLayer* WebSolidColorLayerImpl::layer() | 24 WebLayer* WebSolidColorLayerImpl::layer() |
30 { | 25 { |
31 return m_layer.get(); | 26 return m_layer.get(); |
32 } | 27 } |
33 | 28 |
34 void WebSolidColorLayerImpl::setBackgroundColor(WebColor color) | 29 void WebSolidColorLayerImpl::setBackgroundColor(WebColor color) |
35 { | 30 { |
36 m_layer->setBackgroundColor(color); | 31 m_layer->setBackgroundColor(color); |
37 } | 32 } |
38 | 33 |
39 } // namespace WebKit | 34 } // namespace WebKit |
OLD | NEW |