OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 5 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
6 | 6 |
7 #include "ppapi/c/private/ppb_x509_certificate_private.h" | 7 #include "ppapi/c/private/ppb_x509_certificate_private.h" |
8 #include "ppapi/proxy/plugin_globals.h" | 8 #include "ppapi/proxy/plugin_globals.h" |
9 #include "ppapi/proxy/plugin_proxy_delegate.h" | |
10 #include "ppapi/proxy/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
11 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" | 10 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" |
12 | 11 |
13 namespace ppapi { | 12 namespace ppapi { |
14 namespace proxy { | 13 namespace proxy { |
15 | 14 |
16 namespace { | 15 namespace { |
17 | 16 |
18 class X509CertificatePrivate : public PPB_X509Certificate_Private_Shared { | 17 class X509CertificatePrivate : public PPB_X509Certificate_Private_Shared { |
19 public: | 18 public: |
(...skipping 18 matching lines...) Expand all Loading... |
38 | 37 |
39 bool X509CertificatePrivate::ParseDER(const std::vector<char>& der, | 38 bool X509CertificatePrivate::ParseDER(const std::vector<char>& der, |
40 PPB_X509Certificate_Fields* result) { | 39 PPB_X509Certificate_Fields* result) { |
41 bool succeeded = false; | 40 bool succeeded = false; |
42 SendToBrowser( | 41 SendToBrowser( |
43 new PpapiHostMsg_PPBX509Certificate_ParseDER(der, &succeeded, result)); | 42 new PpapiHostMsg_PPBX509Certificate_ParseDER(der, &succeeded, result)); |
44 return succeeded; | 43 return succeeded; |
45 } | 44 } |
46 | 45 |
47 void X509CertificatePrivate::SendToBrowser(IPC::Message* msg) { | 46 void X509CertificatePrivate::SendToBrowser(IPC::Message* msg) { |
48 PluginGlobals::Get()->plugin_proxy_delegate()->SendToBrowser(msg); | 47 PluginGlobals::Get()->GetBrowserSender()->Send(msg); |
49 } | 48 } |
50 | 49 |
51 } // namespace | 50 } // namespace |
52 | 51 |
53 //------------------------------------------------------------------------------ | 52 //------------------------------------------------------------------------------ |
54 | 53 |
55 PPB_X509Certificate_Private_Proxy::PPB_X509Certificate_Private_Proxy( | 54 PPB_X509Certificate_Private_Proxy::PPB_X509Certificate_Private_Proxy( |
56 Dispatcher* dispatcher) | 55 Dispatcher* dispatcher) |
57 : InterfaceProxy(dispatcher) { | 56 : InterfaceProxy(dispatcher) { |
58 } | 57 } |
59 | 58 |
60 PPB_X509Certificate_Private_Proxy::~PPB_X509Certificate_Private_Proxy() { | 59 PPB_X509Certificate_Private_Proxy::~PPB_X509Certificate_Private_Proxy() { |
61 } | 60 } |
62 | 61 |
63 // static | 62 // static |
64 PP_Resource PPB_X509Certificate_Private_Proxy::CreateProxyResource( | 63 PP_Resource PPB_X509Certificate_Private_Proxy::CreateProxyResource( |
65 PP_Instance instance) { | 64 PP_Instance instance) { |
66 return (new X509CertificatePrivate(instance))->GetReference(); | 65 return (new X509CertificatePrivate(instance))->GetReference(); |
67 } | 66 } |
68 | 67 |
69 bool PPB_X509Certificate_Private_Proxy::OnMessageReceived( | 68 bool PPB_X509Certificate_Private_Proxy::OnMessageReceived( |
70 const IPC::Message& msg) { | 69 const IPC::Message& msg) { |
71 return false; | 70 return false; |
72 } | 71 } |
73 | 72 |
74 } // namespace proxy | 73 } // namespace proxy |
75 } // namespace ppapi | 74 } // namespace ppapi |
OLD | NEW |