Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_crypto_proxy.h" | 5 #include "ppapi/proxy/ppb_crypto_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_crypto_dev.h" | 7 #include "ppapi/c/dev/ppb_crypto_dev.h" |
| 8 #include "ppapi/proxy/interface_id.h" | 8 #include "ppapi/proxy/interface_id.h" |
| 9 #include "ppapi/shared_impl/crypto_impl.h" | 9 #include "ppapi/shared_impl/crypto_impl.h" |
| 10 | 10 |
| 11 namespace ppapi { | 11 namespace ppapi { |
| 12 namespace proxy { | 12 namespace proxy { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const PPB_Crypto_Dev crypto_interface = { | 16 const PPB_Crypto_Dev crypto_interface = { |
| 17 &ppapi::CryptoImpl::GetRandomBytes | 17 &ppapi::CryptoImpl::GetRandomBytes |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 InterfaceProxy* CreateCryptoProxy(Dispatcher* dispatcher, | 20 InterfaceProxy* CreateCryptoProxy(Dispatcher* dispatcher) { |
|
noelallen_use_chromium
2011/09/07 21:16:57
Is this still needed?
| |
| 21 const void* target_interface) { | 21 return new PPB_Crypto_Proxy(dispatcher); |
| 22 return new PPB_Crypto_Proxy(dispatcher, target_interface); | |
| 23 } | 22 } |
| 24 | 23 |
| 25 } // namespace | 24 } // namespace |
| 26 | 25 |
| 27 PPB_Crypto_Proxy::PPB_Crypto_Proxy(Dispatcher* dispatcher, | 26 PPB_Crypto_Proxy::PPB_Crypto_Proxy(Dispatcher* dispatcher) |
| 28 const void* target_interface) | 27 : InterfaceProxy(dispatcher) { |
| 29 : InterfaceProxy(dispatcher, target_interface) { | |
| 30 NOTREACHED(); // See comment in the header file. | 28 NOTREACHED(); // See comment in the header file. |
| 31 } | 29 } |
| 32 | 30 |
| 33 PPB_Crypto_Proxy::~PPB_Crypto_Proxy() { | 31 PPB_Crypto_Proxy::~PPB_Crypto_Proxy() { |
| 34 } | 32 } |
| 35 | 33 |
| 36 // static | 34 // static |
| 37 const InterfaceProxy::Info* PPB_Crypto_Proxy::GetInfo() { | 35 const InterfaceProxy::Info* PPB_Crypto_Proxy::GetInfo() { |
|
noelallen_use_chromium
2011/09/07 21:16:57
Shouldn't this be going away?
| |
| 38 static const Info info = { | 36 static const Info info = { |
| 39 &crypto_interface, | 37 &crypto_interface, |
| 40 PPB_CRYPTO_DEV_INTERFACE, | 38 PPB_CRYPTO_DEV_INTERFACE, |
| 41 INTERFACE_ID_PPB_CRYPTO, | 39 INTERFACE_ID_PPB_CRYPTO, |
| 42 false, | 40 false, |
| 43 &CreateCryptoProxy, | 41 &CreateCryptoProxy, |
| 44 }; | 42 }; |
| 45 return &info; | 43 return &info; |
| 46 } | 44 } |
| 47 | 45 |
| 48 bool PPB_Crypto_Proxy::OnMessageReceived(const IPC::Message& msg) { | 46 bool PPB_Crypto_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| 49 NOTREACHED(); | 47 NOTREACHED(); |
| 50 return false; | 48 return false; |
| 51 } | 49 } |
| 52 | 50 |
| 53 } // namespace proxy | 51 } // namespace proxy |
| 54 } // namespace ppapi | 52 } // namespace ppapi |
| OLD | NEW |