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