Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: ppapi/proxy/ppb_crypto_proxy.cc

Issue 7844018: Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_crypto_proxy.h ('k') | ppapi/proxy/ppb_cursor_control_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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,
21 return new PPB_Crypto_Proxy(dispatcher); 21 const void* target_interface) {
22 return new PPB_Crypto_Proxy(dispatcher, target_interface);
22 } 23 }
23 24
24 } // namespace 25 } // namespace
25 26
26 PPB_Crypto_Proxy::PPB_Crypto_Proxy(Dispatcher* dispatcher) 27 PPB_Crypto_Proxy::PPB_Crypto_Proxy(Dispatcher* dispatcher,
27 : InterfaceProxy(dispatcher) { 28 const void* target_interface)
29 : InterfaceProxy(dispatcher, target_interface) {
28 NOTREACHED(); // See comment in the header file. 30 NOTREACHED(); // See comment in the header file.
29 } 31 }
30 32
31 PPB_Crypto_Proxy::~PPB_Crypto_Proxy() { 33 PPB_Crypto_Proxy::~PPB_Crypto_Proxy() {
32 } 34 }
33 35
34 // static 36 // static
35 const InterfaceProxy::Info* PPB_Crypto_Proxy::GetInfo() { 37 const InterfaceProxy::Info* PPB_Crypto_Proxy::GetInfo() {
36 static const Info info = { 38 static const Info info = {
37 &crypto_interface, 39 &crypto_interface,
38 PPB_CRYPTO_DEV_INTERFACE, 40 PPB_CRYPTO_DEV_INTERFACE,
39 INTERFACE_ID_PPB_CRYPTO, 41 INTERFACE_ID_PPB_CRYPTO,
40 false, 42 false,
41 &CreateCryptoProxy, 43 &CreateCryptoProxy,
42 }; 44 };
43 return &info; 45 return &info;
44 } 46 }
45 47
46 bool PPB_Crypto_Proxy::OnMessageReceived(const IPC::Message& msg) { 48 bool PPB_Crypto_Proxy::OnMessageReceived(const IPC::Message& msg) {
47 NOTREACHED(); 49 NOTREACHED();
48 return false; 50 return false;
49 } 51 }
50 52
51 } // namespace proxy 53 } // namespace proxy
52 } // namespace ppapi 54 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_crypto_proxy.h ('k') | ppapi/proxy/ppb_cursor_control_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698