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

Side by Side Diff: ppapi/proxy/irt_ppapi.c

Issue 171683019: NaCl: Address some TODOs from moving PPAPI IRT interface into the Chromium repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/nacl_irt/irt_ppapi.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/public/irt_core.h" 7 #include "native_client/src/public/irt_core.h"
8 #include "native_client/src/untrusted/irt/irt.h" 8 #include "native_client/src/untrusted/irt/irt.h"
9 #include "native_client/src/untrusted/irt/irt_private.h" 9 #include "native_client/src/untrusted/irt/irt_private.h"
10 #include "ppapi/nacl_irt/irt_ppapi.h" 10 #include "ppapi/nacl_irt/irt_ppapi.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 void PPP_ShutdownModule(void) { 28 void PPP_ShutdownModule(void) {
29 g_pp_functions.PPP_ShutdownModule(); 29 g_pp_functions.PPP_ShutdownModule();
30 } 30 }
31 31
32 const void* PPP_GetInterface(const char* interface_name) { 32 const void* PPP_GetInterface(const char* interface_name) {
33 return g_pp_functions.PPP_GetInterface(interface_name); 33 return g_pp_functions.PPP_GetInterface(interface_name);
34 } 34 }
35 35
36 /* 36 static const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
37 * TODO(mseaborn): This can be made static when the NaCl side no
38 * longer refers to it.
39 */
40 const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
41 irt_ppapi_start, 37 irt_ppapi_start,
42 PpapiPluginRegisterThreadCreator, 38 PpapiPluginRegisterThreadCreator,
43 }; 39 };
44 40
45 static const struct nacl_irt_interface irt_interfaces[] = { 41 static const struct nacl_irt_interface irt_interfaces[] = {
46 { NACL_IRT_PPAPIHOOK_v0_1, &nacl_irt_ppapihook, sizeof(nacl_irt_ppapihook), 42 { NACL_IRT_PPAPIHOOK_v0_1, &nacl_irt_ppapihook, sizeof(nacl_irt_ppapihook),
47 NULL }, 43 NULL },
48 }; 44 };
49 45
50 static size_t chrome_irt_query(const char* interface_ident, 46 static size_t chrome_irt_query(const char* interface_ident,
51 void* table, size_t tablesize) { 47 void* table, size_t tablesize) {
52 size_t result = nacl_irt_query_core(interface_ident, table, tablesize); 48 size_t result = nacl_irt_query_core(interface_ident, table, tablesize);
53 if (result != 0) 49 if (result != 0)
54 return result; 50 return result;
55 return nacl_irt_query_list(interface_ident, table, tablesize, 51 return nacl_irt_query_list(interface_ident, table, tablesize,
56 irt_interfaces, sizeof(irt_interfaces)); 52 irt_interfaces, sizeof(irt_interfaces));
57 } 53 }
58 54
59 void nacl_irt_start(uint32_t* info) { 55 void nacl_irt_start(uint32_t* info) {
60 nacl_irt_init(info); 56 nacl_irt_init(info);
61 nacl_irt_enter_user_code(info, chrome_irt_query); 57 nacl_irt_enter_user_code(info, chrome_irt_query);
62 } 58 }
OLDNEW
« no previous file with comments | « ppapi/nacl_irt/irt_ppapi.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698