| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "webkit/plugins/ppapi/common.h" | 8 #include "webkit/plugins/ppapi/common.h" |
| 9 #include "webkit/plugins/ppapi/ppb_video_layer_software.h" | 9 #include "webkit/plugins/ppapi/ppb_video_layer_software.h" |
| 10 | 10 |
| 11 using ppapi::thunk::PPB_VideoLayer_API; | 11 using ppapi::thunk::PPB_VideoLayer_API; |
| 12 | 12 |
| 13 namespace webkit { | 13 namespace webkit { |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 | 15 |
| 16 PPB_VideoLayer_Impl::PPB_VideoLayer_Impl(PluginInstance* instance) | 16 PPB_VideoLayer_Impl::PPB_VideoLayer_Impl(PP_Instance instance) |
| 17 : Resource(instance) { | 17 : Resource(instance) { |
| 18 } | 18 } |
| 19 | 19 |
| 20 PPB_VideoLayer_Impl::~PPB_VideoLayer_Impl() { | 20 PPB_VideoLayer_Impl::~PPB_VideoLayer_Impl() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 PP_Resource PPB_VideoLayer_Impl::Create(PluginInstance* instance, | 24 PP_Resource PPB_VideoLayer_Impl::Create(PP_Instance instance, |
| 25 PP_VideoLayerMode_Dev mode) { | 25 PP_VideoLayerMode_Dev mode) { |
| 26 if (mode != PP_VIDEOLAYERMODE_SOFTWARE) | 26 if (mode != PP_VIDEOLAYERMODE_SOFTWARE) |
| 27 return 0; | 27 return 0; |
| 28 return (new PPB_VideoLayer_Software(instance))->GetReference(); | 28 return (new PPB_VideoLayer_Software(instance))->GetReference(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() { | 31 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() { |
| 32 return this; | 32 return this; |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace ppapi | 35 } // namespace ppapi |
| 36 } // namespace webkit | 36 } // namespace webkit |
| OLD | NEW |