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

Unified Diff: ppapi/nacl_irt/irt_ppapi.cc

Issue 1245893002: Reland of NaCl cleanup: Split out irt_interfaces.cc from irt_ppapi.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/nacl_irt/irt_ppapi.h ('k') | ppapi/nacl_irt/irt_start.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/nacl_irt/irt_ppapi.cc
diff --git a/ppapi/nacl_irt/irt_ppapi.cc b/ppapi/nacl_irt/irt_ppapi.cc
index a9c13eb89072a14a4b007c5033b5a41869e8df6d..7cdf58957c5fdfea09ed21f0ac9a83fa27007de1 100644
--- a/ppapi/nacl_irt/irt_ppapi.cc
+++ b/ppapi/nacl_irt/irt_ppapi.cc
@@ -2,17 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <unistd.h>
-
#include "build/build_config.h"
-#include "native_client/src/public/irt_core.h"
-#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
-#include "native_client/src/untrusted/irt/irt.h"
-#include "ppapi/nacl_irt/irt_manifest.h"
+#include "ppapi/nacl_irt/irt_interfaces.h"
#include "ppapi/nacl_irt/irt_ppapi.h"
#include "ppapi/nacl_irt/plugin_main.h"
#include "ppapi/nacl_irt/public/irt_ppapi.h"
-#include "ppapi/native_client/src/untrusted/pnacl_irt_shim/irt_shim_ppapi.h"
static struct PP_StartFunctions g_pp_functions;
@@ -34,62 +28,7 @@
return g_pp_functions.PPP_GetInterface(interface_name);
}
-static const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
+const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
irt_ppapi_start,
PpapiPluginRegisterThreadCreator,
};
-
-#if defined(OS_NACL_SFI)
-static int ppapihook_pnacl_private_filter(void) {
- int pnacl_mode = sysconf(NACL_ABI__SC_NACL_PNACL_MODE);
- if (pnacl_mode == -1)
- return 0;
- return pnacl_mode;
-}
-#endif
-
-static const nacl_irt_resource_open kIrtResourceOpen = {
- ppapi::IrtOpenResource,
-};
-
-#if defined(OS_NACL_SFI)
-static int not_pnacl_filter(void) {
- int pnacl_mode = sysconf(NACL_ABI__SC_NACL_PNACL_MODE);
- if (pnacl_mode == -1)
- return 0;
- return !pnacl_mode;
-}
-#endif
-
-static const struct nacl_irt_interface irt_interfaces[] = {
- { NACL_IRT_PPAPIHOOK_v0_1, &nacl_irt_ppapihook, sizeof(nacl_irt_ppapihook),
- NULL },
-#if defined(OS_NACL_SFI)
- { NACL_IRT_PPAPIHOOK_PNACL_PRIVATE_v0_1,
- &nacl_irt_ppapihook_pnacl_private, sizeof(nacl_irt_ppapihook_pnacl_private),
- ppapihook_pnacl_private_filter },
-#endif
- { NACL_IRT_RESOURCE_OPEN_v0_1, &kIrtResourceOpen,
- sizeof(kIrtResourceOpen),
-#if defined(OS_NACL_SFI)
- not_pnacl_filter,
-#else
- // If we change PNaCl to use Non-SFI Mode on the open web,
- // we should add a filter here.
- NULL,
-#endif
- },
-};
-
-size_t chrome_irt_query(const char* interface_ident,
- void* table, size_t tablesize) {
- size_t result = nacl_irt_query_list(interface_ident,
- table,
- tablesize,
- irt_interfaces,
- sizeof(irt_interfaces));
- if (result != 0)
- return result;
-
- return nacl_irt_query_core(interface_ident, table, tablesize);
-}
« no previous file with comments | « ppapi/nacl_irt/irt_ppapi.h ('k') | ppapi/nacl_irt/irt_start.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698