| OLD | NEW | 
|---|
|  | (Empty) | 
| 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. |  | 
| 4 |  | 
| 5 #include "webkit/compositor_bindings/web_video_layer_impl.h" |  | 
| 6 |  | 
| 7 #include "base/bind.h" |  | 
| 8 #include "cc/layers/video_layer.h" |  | 
| 9 #include "webkit/compositor_bindings/web_layer_impl.h" |  | 
| 10 #include "webkit/compositor_bindings/web_to_ccvideo_frame_provider.h" |  | 
| 11 #include "webkit/media/webvideoframe_impl.h" |  | 
| 12 |  | 
| 13 namespace webkit { |  | 
| 14 |  | 
| 15 WebVideoLayerImpl::WebVideoLayerImpl( |  | 
| 16     WebKit::WebVideoFrameProvider* web_provider) |  | 
| 17     : provider_adapter_(WebToCCVideoFrameProvider::Create(web_provider)), |  | 
| 18       layer_( |  | 
| 19           new WebLayerImpl(cc::VideoLayer::Create(provider_adapter_.get()))) {} |  | 
| 20 |  | 
| 21 WebVideoLayerImpl::~WebVideoLayerImpl() {} |  | 
| 22 |  | 
| 23 WebKit::WebLayer* WebVideoLayerImpl::layer() { return layer_.get(); } |  | 
| 24 |  | 
| 25 bool WebVideoLayerImpl::active() const { |  | 
| 26   return !!layer_->layer()->layer_tree_host(); |  | 
| 27 } |  | 
| 28 |  | 
| 29 }  // namespace webkit |  | 
| OLD | NEW | 
|---|