| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 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/plugins/ppapi/ppb_flash_x509_certificate_impl.h" |
| 6 |
| 7 #include "webkit/plugins/ppapi/host_globals.h" |
| 8 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 10 #include "webkit/plugins/ppapi/resource_helper.h" |
| 11 |
| 12 namespace webkit { |
| 13 namespace ppapi { |
| 14 |
| 15 // static |
| 16 PP_Resource PPB_Flash_X509Certificate_Impl::CreateResource( |
| 17 PP_Instance instance) { |
| 18 return (new PPB_Flash_X509Certificate_Impl( |
| 19 ::ppapi::OBJECT_IS_IMPL, instance))->GetReference(); |
| 20 } |
| 21 |
| 22 PPB_Flash_X509Certificate_Impl::PPB_Flash_X509Certificate_Impl( |
| 23 ::ppapi::ResourceObjectType type, PP_Instance instance) : |
| 24 PPB_Flash_X509Certificate_Shared(type, instance) { |
| 25 } |
| 26 |
| 27 bool PPB_Flash_X509Certificate_Impl::ParseDER(const std::vector<char>& der, |
| 28 ::ppapi::PPB_X509Certificate_Fields* result) { |
| 29 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
| 30 if (!plugin_delegate) { |
| 31 return false; |
| 32 } |
| 33 |
| 34 return plugin_delegate->X509CertificateParseDER(der, result); |
| 35 } |
| 36 |
| 37 PPB_Flash_X509Certificate_Impl::~PPB_Flash_X509Certificate_Impl() { |
| 38 } |
| 39 |
| 40 } // namespace ppapi |
| 41 } // namespace webkit |
| OLD | NEW |