| Index: ppapi/proxy/ppb_flash_x509_certificate_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_flash_x509_certificate_proxy.cc b/ppapi/proxy/ppb_flash_x509_certificate_proxy.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..377912eaa1d794f4c474a90d03b6887bb6b9efaf
|
| --- /dev/null
|
| +++ b/ppapi/proxy/ppb_flash_x509_certificate_proxy.cc
|
| @@ -0,0 +1,79 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ppapi/proxy/ppb_flash_x509_certificate_proxy.h"
|
| +
|
| +#include "ppapi/c/pp_errors.h"
|
| +#include "ppapi/c/private/ppb_flash_x509_certificate.h"
|
| +#include "ppapi/shared_impl/private/ppb_flash_x509_certificate_shared.h"
|
| +#include "ppapi/proxy/plugin_globals.h"
|
| +#include "ppapi/proxy/plugin_proxy_delegate.h"
|
| +#include "ppapi/proxy/ppapi_messages.h"
|
| +#include "ppapi/proxy/serialized_var.h"
|
| +#include "ppapi/thunk/enter.h"
|
| +
|
| +namespace ppapi {
|
| +namespace proxy {
|
| +
|
| +namespace {
|
| +
|
| +class FlashX509Certificate : public PPB_Flash_X509Certificate_Shared {
|
| + public:
|
| + FlashX509Certificate(ResourceObjectType type, PP_Instance instance);
|
| + virtual ~FlashX509Certificate();
|
| +
|
| + virtual bool ParseDER(const std::vector<char>& der,
|
| + PPB_X509Certificate_Fields* result) OVERRIDE;
|
| +
|
| + private:
|
| + void SendToBrowser(IPC::Message* msg);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FlashX509Certificate);
|
| +};
|
| +
|
| +FlashX509Certificate::FlashX509Certificate(ResourceObjectType type,
|
| + PP_Instance instance)
|
| + : PPB_Flash_X509Certificate_Shared(type, instance) {
|
| +}
|
| +
|
| +FlashX509Certificate::~FlashX509Certificate() {
|
| +}
|
| +
|
| +bool FlashX509Certificate::ParseDER(const std::vector<char>& der,
|
| + PPB_X509Certificate_Fields* result) {
|
| + bool succeeded = false;
|
| + SendToBrowser(
|
| + new PpapiHostMsg_PPBX509Certificate_ParseDER(der, &succeeded, result));
|
| + return succeeded;
|
| +}
|
| +
|
| +void FlashX509Certificate::SendToBrowser(IPC::Message* msg) {
|
| + PluginGlobals::Get()->plugin_proxy_delegate()->SendToBrowser(msg);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +//------------------------------------------------------------------------------
|
| +
|
| +PPB_Flash_X509Certificate_Proxy::PPB_Flash_X509Certificate_Proxy(
|
| + Dispatcher* dispatcher)
|
| + : InterfaceProxy(dispatcher) {
|
| +}
|
| +
|
| +PPB_Flash_X509Certificate_Proxy::~PPB_Flash_X509Certificate_Proxy() {
|
| +}
|
| +
|
| +// static
|
| +PP_Resource PPB_Flash_X509Certificate_Proxy::CreateProxyResource(
|
| + PP_Instance instance) {
|
| + return (new FlashX509Certificate(OBJECT_IS_PROXY, instance))->GetReference();
|
| +}
|
| +
|
| +bool PPB_Flash_X509Certificate_Proxy::OnMessageReceived(
|
| + const IPC::Message& msg) {
|
| + return false;
|
| +}
|
| +
|
| +} // namespace proxy
|
| +} // namespace ppapi
|
|
|