• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "content/renderer/compositor_bindings/web_solid_color_layer_impl.h"
6 
7 #include "cc/layers/solid_color_layer.h"
8 #include "content/renderer/compositor_bindings/web_layer_impl.h"
9 
10 using cc::SolidColorLayer;
11 
12 namespace content {
13 
WebSolidColorLayerImpl()14 WebSolidColorLayerImpl::WebSolidColorLayerImpl()
15     : layer_(new WebLayerImpl(SolidColorLayer::Create())) {
16   layer_->layer()->SetIsDrawable(true);
17 }
18 
~WebSolidColorLayerImpl()19 WebSolidColorLayerImpl::~WebSolidColorLayerImpl() {
20 }
21 
layer()22 blink::WebLayer* WebSolidColorLayerImpl::layer() {
23   return layer_.get();
24 }
25 
setBackgroundColor(blink::WebColor color)26 void WebSolidColorLayerImpl::setBackgroundColor(blink::WebColor color) {
27   layer_->setBackgroundColor(color);
28 }
29 
30 }  // namespace content
31 
32