Home | History | Annotate | Download | only in pepper
      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 "content/renderer/pepper/ppb_x509_certificate_private_impl.h"
      6 
      7 #include "content/renderer/render_thread_impl.h"
      8 #include "ppapi/proxy/ppapi_messages.h"
      9 
     10 namespace content {
     11 
     12 PPB_X509Certificate_Private_Impl::PPB_X509Certificate_Private_Impl(
     13     PP_Instance instance) :
     14   PPB_X509Certificate_Private_Shared(ppapi::OBJECT_IS_IMPL, instance) {
     15 }
     16 
     17 // static
     18 PP_Resource PPB_X509Certificate_Private_Impl::CreateResource(
     19     PP_Instance instance) {
     20   return (new PPB_X509Certificate_Private_Impl(instance))->GetReference();
     21 }
     22 
     23 bool PPB_X509Certificate_Private_Impl::ParseDER(
     24     const std::vector<char>& der,
     25     ppapi::PPB_X509Certificate_Fields* result) {
     26   bool succeeded = false;
     27   RenderThreadImpl::current()->Send(
     28       new PpapiHostMsg_PPBX509Certificate_ParseDER(der, &succeeded, result));
     29   return succeeded;
     30 }
     31 
     32 PPB_X509Certificate_Private_Impl::~PPB_X509Certificate_Private_Impl() {
     33 }
     34 
     35 }  // namespace content
     36