Commit 0d16846a authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Remove nacl_entry_points.h.

This function indirection is no longer necessary, and I was getting frustrated
by having the type signature of LaunchSelLdr twice in the source. I came across
this in an experimental CL modifying LaunchSelLdr to also receive information
for the user nexe.

BUG=333950
R=dmichael@chromium.org

Review URL: https://codereview.chromium.org/322403005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276466 0039d316-1c4b-4281-b951-d872f2087c98
parent b4520d68
include_rules = [
"+content/public/renderer",
"+native_client/src/public/imc_types.h", # for NaClHandle
"+net",
"+ppapi/c",
"+ppapi/native_client/src/trusted/plugin/nacl_entry_points.h", # For NaCl registration.
"+ppapi/proxy",
"+ppapi/shared_impl",
......
......@@ -26,7 +26,6 @@
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/private/pp_file_handle.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ppapi/shared_impl/ppapi_preferences.h"
......
......@@ -38,12 +38,12 @@
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "native_client/src/public/imc_types.h"
#include "net/base/data_url.h"
#include "net/base/net_errors.h"
#include "net/http/http_util.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/private/pp_file_handle.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ppapi/shared_impl/ppapi_preferences.h"
......
......@@ -10,7 +10,6 @@
#include "native_client/src/trusted/desc/nrd_all_modules.h"
#include "ppapi/native_client/src/trusted/plugin/module_ppapi.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/native_client/src/trusted/plugin/plugin.h"
#include "ppapi/native_client/src/trusted/plugin/utility.h"
......@@ -44,9 +43,6 @@ bool ModulePpapi::Init() {
}
SetNaClInterface(private_interface_);
launch_nacl_process = reinterpret_cast<LaunchNaClProcessFunc>(
private_interface_->LaunchSelLdr);
#if NACL_LINUX || NACL_OSX
// Note that currently we do not need random numbers inside the
// NaCl trusted plugin on Unix, but NaClSecureRngModuleInit() is
......
/*
* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_ENTRY_POINTS_H_
#define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_ENTRY_POINTS_H_
#include <stddef.h>
#include <map>
#include <string>
#include "native_client/src/shared/imc/nacl_imc_c.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/private/ppb_instance_private.h"
#include "ppapi/c/private/ppb_nacl_private.h"
typedef PP_ExternalPluginResult (*LaunchNaClProcessFunc)(
PP_Instance instance,
PP_Bool main_service_runtime,
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool uses_nonsfi_mode,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
PP_Bool enable_crash_throttling,
const PPP_ManifestService* manifest_service_interface,
void* manifest_service_user_data,
NaClHandle* result_socket,
PP_CompletionCallback callback);
extern LaunchNaClProcessFunc launch_nacl_process;
#endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_ENTRY_POINTS_H_
......@@ -27,7 +27,6 @@
#include "ppapi/cpp/dev/url_util_dev.h"
#include "ppapi/cpp/module.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_subprocess.h"
#include "ppapi/native_client/src/trusted/plugin/plugin_error.h"
#include "ppapi/native_client/src/trusted/plugin/service_runtime.h"
......
......@@ -5,10 +5,8 @@
#include "native_client/src/include/nacl_macros.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/module.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h"
LaunchNaClProcessFunc launch_nacl_process = NULL;
#include "ppapi/native_client/src/trusted/plugin/utility.h"
namespace plugin {
......@@ -31,24 +29,25 @@ void SelLdrLauncherChrome::Start(
const PPP_ManifestService* manifest_service_interface,
void* manifest_service_user_data,
pp::CompletionCallback callback) {
if (!launch_nacl_process) {
if (!GetNaClInterface()) {
pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED);
return;
}
launch_nacl_process(instance,
PP_FromBool(main_service_runtime),
url,
PP_FromBool(uses_irt),
PP_FromBool(uses_ppapi),
PP_FromBool(uses_nonsfi_mode),
PP_FromBool(enable_ppapi_dev),
PP_FromBool(enable_dyncode_syscalls),
PP_FromBool(enable_exception_handling),
PP_FromBool(enable_crash_throttling),
manifest_service_interface,
manifest_service_user_data,
&channel_,
callback.pp_completion_callback());
GetNaClInterface()->LaunchSelLdr(
instance,
PP_FromBool(main_service_runtime),
url,
PP_FromBool(uses_irt),
PP_FromBool(uses_ppapi),
PP_FromBool(uses_nonsfi_mode),
PP_FromBool(enable_ppapi_dev),
PP_FromBool(enable_dyncode_syscalls),
PP_FromBool(enable_exception_handling),
PP_FromBool(enable_crash_throttling),
manifest_service_interface,
manifest_service_user_data,
&channel_,
callback.pp_completion_callback());
}
} // namespace plugin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment