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