summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-19 22:44:32 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-19 22:44:32 +0000
commit948040137dbf37176256fa2c2dfcf19e98b8a626 (patch)
treef4d22273e2beefa76048cafc2dbcd6aa6bbd6877 /ppapi
parent82b216a03e576343587dea5ca953b3797588bf39 (diff)
downloadchromium_src-948040137dbf37176256fa2c2dfcf19e98b8a626.zip
chromium_src-948040137dbf37176256fa2c2dfcf19e98b8a626.tar.gz
chromium_src-948040137dbf37176256fa2c2dfcf19e98b8a626.tar.bz2
NaCl: Move definition of the "ppapihook" IRT interface to the Chromium repo
This uses the new IRT construction API. This will allow references to PPAPI to be removed from src/untrusted/irt in the NaCl repo. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3787 TEST=browser_tests Review URL: https://codereview.chromium.org/171093002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/irt_ppapi.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/ppapi/proxy/irt_ppapi.c b/ppapi/proxy/irt_ppapi.c
index 5d9c2c2..64c22aa 100644
--- a/ppapi/proxy/irt_ppapi.c
+++ b/ppapi/proxy/irt_ppapi.c
@@ -4,6 +4,7 @@
* found in the LICENSE file.
*/
+#include "native_client/src/public/irt_core.h"
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/irt/irt_private.h"
#include "ppapi/nacl_irt/irt_ppapi.h"
@@ -32,7 +33,30 @@ const void* PPP_GetInterface(const char* interface_name) {
return g_pp_functions.PPP_GetInterface(interface_name);
}
+/*
+ * TODO(mseaborn): This can be made static when the NaCl side no
+ * longer refers to it.
+ */
const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
irt_ppapi_start,
PpapiPluginRegisterThreadCreator,
};
+
+static const struct nacl_irt_interface irt_interfaces[] = {
+ { NACL_IRT_PPAPIHOOK_v0_1, &nacl_irt_ppapihook, sizeof(nacl_irt_ppapihook),
+ NULL },
+};
+
+static size_t chrome_irt_query(const char* interface_ident,
+ void* table, size_t tablesize) {
+ size_t result = nacl_irt_query_core(interface_ident, table, tablesize);
+ if (result != 0)
+ return result;
+ return nacl_irt_query_list(interface_ident, table, tablesize,
+ irt_interfaces, sizeof(irt_interfaces));
+}
+
+void nacl_irt_start(uint32_t* info) {
+ nacl_irt_init(info);
+ nacl_irt_enter_user_code(info, chrome_irt_query);
+}