Commit 01167110 authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Remove trusted plugin loadable module.

This change links the trusted plugin into the renderer, making it easier for
the trusted plugin to use libraries in Chromium. This removes the
ppGoogleNaClPlugin loadable module file on various platforms.

This is part of a larger effort to remove the "trusted plugin" used to
bootstrap NaCl plugins.

It introduces an "internal_module" interface for setting the value returned by
pp::Module::Get(). This is so that both the trusted plugin and the remoting
plugin can be linked into the renderer. However, I believe this is safe because
the trusted plugin runs in-process and the remoting plugin runs out-of-process.

BUG=394497
R=dmichael@chromium.org, mseaborn@chromium.org, phajdan.jr@chromium.org, thestig@chromium.org, wez@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287071

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287580 0039d316-1c4b-4281-b951-d872f2087c98
parent 324b3a1c
...@@ -141,7 +141,6 @@ ...@@ -141,7 +141,6 @@
'isolate_dependency_tracked': [ 'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/keyboard_resources.pak', '<(PRODUCT_DIR)/keyboard_resources.pak',
'<(PRODUCT_DIR)/libexif.so', '<(PRODUCT_DIR)/libexif.so',
'<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/nacl_helper', '<(PRODUCT_DIR)/nacl_helper',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'browser/chromeos/login/test/https_forwarder.py', 'browser/chromeos/login/test/https_forwarder.py',
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
'isolate_dependency_tracked': [ 'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libffmpegsumo.so',
'<(PRODUCT_DIR)/libosmesa.so', '<(PRODUCT_DIR)/libosmesa.so',
'<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/nacl_helper<(EXECUTABLE_SUFFIX)', '<(PRODUCT_DIR)/nacl_helper<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/nacl_helper_bootstrap<(EXECUTABLE_SUFFIX)', '<(PRODUCT_DIR)/nacl_helper_bootstrap<(EXECUTABLE_SUFFIX)',
], ],
...@@ -64,7 +63,6 @@ ...@@ -64,7 +63,6 @@
'<(PRODUCT_DIR)/libexif.dll', '<(PRODUCT_DIR)/libexif.dll',
'<(PRODUCT_DIR)/nacl64<(EXECUTABLE_SUFFIX)', '<(PRODUCT_DIR)/nacl64<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/osmesa.dll', '<(PRODUCT_DIR)/osmesa.dll',
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
], ],
}, },
}], }],
......
...@@ -418,6 +418,7 @@ ...@@ -418,6 +418,7 @@
['disable_nacl==0', { ['disable_nacl==0', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl_common', '<(DEPTH)/components/nacl.gyp:nacl_common',
'<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
], ],
'sources': [ 'sources': [
'common/extensions/manifest_handlers/nacl_modules_handler.cc', 'common/extensions/manifest_handlers/nacl_modules_handler.cc',
......
...@@ -152,9 +152,6 @@ ...@@ -152,9 +152,6 @@
], ],
'conditions': [ 'conditions': [
['disable_nacl!=1', { ['disable_nacl!=1', {
'files': [
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.plugin',
],
'conditions': [ 'conditions': [
['target_arch=="x64"', { ['target_arch=="x64"', {
'files': [ 'files': [
......
...@@ -457,7 +457,6 @@ ...@@ -457,7 +457,6 @@
'<(PRODUCT_DIR)/chrome_sandbox', '<(PRODUCT_DIR)/chrome_sandbox',
'<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libffmpegsumo.so',
'<(PRODUCT_DIR)/libpdf.so', '<(PRODUCT_DIR)/libpdf.so',
'<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/xdg-mime', '<(PRODUCT_DIR)/xdg-mime',
'<(PRODUCT_DIR)/xdg-settings', '<(PRODUCT_DIR)/xdg-settings',
'<(PRODUCT_DIR)/locales/en-US.pak', '<(PRODUCT_DIR)/locales/en-US.pak',
......
...@@ -1693,7 +1693,7 @@ ...@@ -1693,7 +1693,7 @@
], ],
'dependencies': [ 'dependencies': [
# Runtime dependency. # Runtime dependency.
'../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome', '../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
], ],
'conditions': [ 'conditions': [
['disable_nacl_untrusted==0', { ['disable_nacl_untrusted==0', {
......
...@@ -20,6 +20,7 @@ include_rules = [ ...@@ -20,6 +20,7 @@ include_rules = [
"+google_apis/gaia", # For gaia_switches.h "+google_apis/gaia", # For gaia_switches.h
"+grit", # For generated headers "+grit", # For generated headers
"+media", "+media",
"+ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h",
"+ppapi/shared_impl", "+ppapi/shared_impl",
"+remoting/client/plugin", "+remoting/client/plugin",
"+webkit/common/user_agent", "+webkit/common/user_agent",
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
#include "components/nacl/common/nacl_sandbox_type_mac.h" #include "components/nacl/common/nacl_sandbox_type_mac.h"
#endif #endif
#if !defined(DISABLE_NACL)
#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
#endif
#if defined(ENABLE_REMOTING) #if defined(ENABLE_REMOTING)
#include "remoting/client/plugin/pepper_entrypoints.h" #include "remoting/client/plugin/pepper_entrypoints.h"
#endif #endif
...@@ -70,6 +74,7 @@ const char kPDFPluginOutOfProcessMimeType[] = ...@@ -70,6 +74,7 @@ const char kPDFPluginOutOfProcessMimeType[] =
const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE | const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE |
ppapi::PERMISSION_DEV; ppapi::PERMISSION_DEV;
#if !defined(DISABLE_NACL)
const char kNaClPluginMimeType[] = "application/x-nacl"; const char kNaClPluginMimeType[] = "application/x-nacl";
const char kNaClPluginExtension[] = ""; const char kNaClPluginExtension[] = "";
const char kNaClPluginDescription[] = "Native Client Executable"; const char kNaClPluginDescription[] = "Native Client Executable";
...@@ -79,6 +84,7 @@ const uint32 kNaClPluginPermissions = ppapi::PERMISSION_PRIVATE | ...@@ -79,6 +84,7 @@ const uint32 kNaClPluginPermissions = ppapi::PERMISSION_PRIVATE |
const char kPnaclPluginMimeType[] = "application/x-pnacl"; const char kPnaclPluginMimeType[] = "application/x-pnacl";
const char kPnaclPluginExtension[] = ""; const char kPnaclPluginExtension[] = "";
const char kPnaclPluginDescription[] = "Portable Native Client Executable"; const char kPnaclPluginDescription[] = "Portable Native Client Executable";
#endif // !defined(DISABLE_NACL)
const char kO1DPluginName[] = "Google Talk Plugin Video Renderer"; const char kO1DPluginName[] = "Google Talk Plugin Video Renderer";
const char kO1DPluginMimeType[] ="application/o1d"; const char kO1DPluginMimeType[] ="application/o1d";
...@@ -166,30 +172,34 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { ...@@ -166,30 +172,34 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
} }
} }
#if !defined(DISABLE_NACL)
// Handle Native Client just like the PDF plugin. This means that it is // Handle Native Client just like the PDF plugin. This means that it is
// enabled by default for the non-portable case. This allows apps installed // enabled by default for the non-portable case. This allows apps installed
// from the Chrome Web Store to use NaCl even if the command line switch // from the Chrome Web Store to use NaCl even if the command line switch
// isn't set. For other uses of NaCl we check for the command line switch. // isn't set. For other uses of NaCl we check for the command line switch.
static bool skip_nacl_file_check = false;
if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) {
if (skip_nacl_file_check || base::PathExists(path)) { content::PepperPluginInfo nacl;
content::PepperPluginInfo nacl; // The nacl plugin is now built into the Chromium binary.
nacl.path = path; nacl.is_internal = true;
nacl.name = ChromeContentClient::kNaClPluginName; nacl.path = path;
content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, nacl.name = ChromeContentClient::kNaClPluginName;
kNaClPluginExtension, content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
kNaClPluginDescription); kNaClPluginExtension,
nacl.mime_types.push_back(nacl_mime_type); kNaClPluginDescription);
content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, nacl.mime_types.push_back(nacl_mime_type);
kPnaclPluginExtension, content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType,
kPnaclPluginDescription); kPnaclPluginExtension,
nacl.mime_types.push_back(pnacl_mime_type); kPnaclPluginDescription);
nacl.permissions = kNaClPluginPermissions; nacl.mime_types.push_back(pnacl_mime_type);
plugins->push_back(nacl); nacl.internal_entry_points.get_interface = nacl_plugin::PPP_GetInterface;
nacl.internal_entry_points.initialize_module =
skip_nacl_file_check = true; nacl_plugin::PPP_InitializeModule;
} nacl.internal_entry_points.shutdown_module =
nacl_plugin::PPP_ShutdownModule;
nacl.permissions = kNaClPluginPermissions;
plugins->push_back(nacl);
} }
#endif // !defined(DISABLE_NACL)
static bool skip_o1d_file_check = false; static bool skip_o1d_file_check = false;
if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) { if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {
......
...@@ -60,16 +60,8 @@ const base::FilePath::CharType kInternalPDFPluginFileName[] = ...@@ -60,16 +60,8 @@ const base::FilePath::CharType kInternalPDFPluginFileName[] =
FILE_PATH_LITERAL("libpdf.so"); FILE_PATH_LITERAL("libpdf.so");
#endif #endif
// File name of the internal NaCl plugin on different platforms.
const base::FilePath::CharType kInternalNaClPluginFileName[] = const base::FilePath::CharType kInternalNaClPluginFileName[] =
#if defined(OS_WIN) FILE_PATH_LITERAL("internal-nacl-plugin");
FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
#elif defined(OS_MACOSX)
// TODO(noelallen) Please verify this extention name is correct.
FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
#else // Linux and Chrome OS
FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
#endif
const base::FilePath::CharType kEffectsPluginFileName[] = const base::FilePath::CharType kEffectsPluginFileName[] =
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -312,6 +304,9 @@ bool PathProvider(int key, base::FilePath* result) { ...@@ -312,6 +304,9 @@ bool PathProvider(int key, base::FilePath* result) {
return false; return false;
cur = cur.Append(kEffectsPluginFileName); cur = cur.Append(kEffectsPluginFileName);
break; break;
// TODO(teravest): Remove this case once the internal NaCl plugin is gone.
// We currently need a path here to look up whether the plugin is disabled
// and what its permissions are.
case chrome::FILE_NACL_PLUGIN: case chrome::FILE_NACL_PLUGIN:
if (!GetInternalPluginsDirectory(&cur)) if (!GetInternalPluginsDirectory(&cur))
return false; return false;
......
...@@ -177,11 +177,6 @@ stage_install_common() { ...@@ -177,11 +177,6 @@ stage_install_common() {
install -m 644 -s "${BUILDDIR}/lib/libpeerconnection.so" "${STAGEDIR}/${INSTALLDIR}/lib/" install -m 644 -s "${BUILDDIR}/lib/libpeerconnection.so" "${STAGEDIR}/${INSTALLDIR}/lib/"
fi fi
# nacl pepper plugin
if [ -f "${BUILDDIR}/libppGoogleNaClPluginChrome.so" ]; then
install -m 644 -s "${BUILDDIR}/libppGoogleNaClPluginChrome.so" "${STAGEDIR}/${INSTALLDIR}/"
fi
# nacl_helper and nacl_helper_bootstrap # nacl_helper and nacl_helper_bootstrap
# Don't use "-s" (strip) because this runs binutils "strip", which # Don't use "-s" (strip) because this runs binutils "strip", which
# mangles the special ELF program headers of nacl_helper_bootstrap. # mangles the special ELF program headers of nacl_helper_bootstrap.
......
...@@ -198,7 +198,6 @@ ...@@ -198,7 +198,6 @@
['disable_nacl==1', { ['disable_nacl==1', {
'inputs!': [ 'inputs!': [
'<(PRODUCT_DIR)/nacl64.exe', '<(PRODUCT_DIR)/nacl64.exe',
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
], ],
...@@ -231,7 +230,6 @@ ...@@ -231,7 +230,6 @@
'<(PRODUCT_DIR)/chrome.exe', '<(PRODUCT_DIR)/chrome.exe',
'<(PRODUCT_DIR)/chrome.dll', '<(PRODUCT_DIR)/chrome.dll',
'<(PRODUCT_DIR)/nacl64.exe', '<(PRODUCT_DIR)/nacl64.exe',
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'<(PRODUCT_DIR)/locales/en-US.pak', '<(PRODUCT_DIR)/locales/en-US.pak',
......
...@@ -185,7 +185,6 @@ ...@@ -185,7 +185,6 @@
'<(PRODUCT_DIR)/chrome.exe', '<(PRODUCT_DIR)/chrome.exe',
'<@(chrome_dll_path)', '<@(chrome_dll_path)',
'<(PRODUCT_DIR)/nacl64.exe', '<(PRODUCT_DIR)/nacl64.exe',
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'<(PRODUCT_DIR)/locales/en-US.pak', '<(PRODUCT_DIR)/locales/en-US.pak',
......
...@@ -34,7 +34,6 @@ nacl64.exe: %(VersionDir)s\ ...@@ -34,7 +34,6 @@ nacl64.exe: %(VersionDir)s\
nacl_irt_x86_32.nexe: %(VersionDir)s\ nacl_irt_x86_32.nexe: %(VersionDir)s\
nacl_irt_x86_64.nexe: %(VersionDir)s\ nacl_irt_x86_64.nexe: %(VersionDir)s\
pdf.dll: %(VersionDir)s\ pdf.dll: %(VersionDir)s\
ppGoogleNaClPluginChrome.dll: %(VersionDir)s\
resources.pak: %(VersionDir)s\ resources.pak: %(VersionDir)s\
syzyasan_rtl.dll: %(VersionDir)s\ syzyasan_rtl.dll: %(VersionDir)s\
xinput1_3.dll: %(VersionDir)s\ xinput1_3.dll: %(VersionDir)s\
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
'<(PRODUCT_DIR)/ffmpegsumo.dll', '<(PRODUCT_DIR)/ffmpegsumo.dll',
'<(PRODUCT_DIR)/libEGL.dll', '<(PRODUCT_DIR)/libEGL.dll',
'<(PRODUCT_DIR)/libGLESv2.dll', '<(PRODUCT_DIR)/libGLESv2.dll',
'<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/osmesa.dll', '<(PRODUCT_DIR)/osmesa.dll',
], ],
'isolate_dependency_untracked': [ 'isolate_dependency_untracked': [
......
...@@ -21,7 +21,6 @@ ln -f -s /opt/google/chrome/*.pak "$this_dir/" ...@@ -21,7 +21,6 @@ ln -f -s /opt/google/chrome/*.pak "$this_dir/"
ln -f -s /opt/google/chrome/nacl_helper "$this_dir/" ln -f -s /opt/google/chrome/nacl_helper "$this_dir/"
ln -f -s /opt/google/chrome/nacl_helper_bootstrap "$this_dir/" ln -f -s /opt/google/chrome/nacl_helper_bootstrap "$this_dir/"
ln -f -s /opt/google/chrome/nacl_irt_*.nexe "$this_dir/" ln -f -s /opt/google/chrome/nacl_irt_*.nexe "$this_dir/"
ln -f -s /opt/google/chrome/libppGoogleNaClPluginChrome.so "$this_dir/"
# Create links to resources from pyauto_dep. # Create links to resources from pyauto_dep.
......
...@@ -199,11 +199,6 @@ void NaClBrowserTestBase::SetUpCommandLine(base::CommandLine* command_line) { ...@@ -199,11 +199,6 @@ void NaClBrowserTestBase::SetUpCommandLine(base::CommandLine* command_line) {
} }
void NaClBrowserTestBase::SetUpOnMainThread() { void NaClBrowserTestBase::SetUpOnMainThread() {
// Sanity check.
base::FilePath plugin_lib;
ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value();
ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; ASSERT_TRUE(StartTestServer()) << "Cannot start test server.";
} }
......
...@@ -342,9 +342,6 @@ void PPAPINaClTest::SetUpCommandLine(base::CommandLine* command_line) { ...@@ -342,9 +342,6 @@ void PPAPINaClTest::SetUpCommandLine(base::CommandLine* command_line) {
} }
void PPAPINaClTest::SetUpOnMainThread() { void PPAPINaClTest::SetUpOnMainThread() {
base::FilePath plugin_lib;
EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
EXPECT_TRUE(base::PathExists(plugin_lib));
} }
void PPAPINaClTest::RunTest(const std::string& test_case) { void PPAPINaClTest::RunTest(const std::string& test_case) {
...@@ -464,8 +461,4 @@ std::string PPAPINaClTestDisallowedSockets::BuildQuery( ...@@ -464,8 +461,4 @@ std::string PPAPINaClTestDisallowedSockets::BuildQuery(
void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
// The default content setting for the PPAPI broker is ASK. We purposefully // The default content setting for the PPAPI broker is ASK. We purposefully
// don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
base::FilePath plugin_lib;
EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
EXPECT_TRUE(base::PathExists(plugin_lib));
} }
...@@ -119,10 +119,6 @@ FILES = [ ...@@ -119,10 +119,6 @@ FILES = [
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
# Native Client plugin files: # Native Client plugin files:
{
'filename': 'libppGoogleNaClPluginChrome.so',
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'nacl_irt_x86_32.nexe', 'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'], 'arch': ['32bit'],
......
...@@ -128,10 +128,6 @@ FILES = [ ...@@ -128,10 +128,6 @@ FILES = [
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
# Native Client plugin files: # Native Client plugin files:
{
'filename': 'libppGoogleNaClPluginChrome.so',
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'nacl_irt_x86_32.nexe', 'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'], 'arch': ['32bit'],
......
...@@ -83,7 +83,6 @@ SRC_NAMES=( ...@@ -83,7 +83,6 @@ SRC_NAMES=(
"crash_report_sender.app" "crash_report_sender.app"
"exif.so" "exif.so"
"ffmpegsumo.so" "ffmpegsumo.so"
"ppGoogleNaClPluginChrome.plugin"
) )
# PDF.plugin is optional. Only include it if present. # PDF.plugin is optional. Only include it if present.
......
...@@ -380,11 +380,6 @@ FILES = [ ...@@ -380,11 +380,6 @@ FILES = [
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
# Native Client plugin files: # Native Client plugin files:
{
'filename': 'ppGoogleNaClPluginChrome.dll',
'buildtype': ['dev', 'official'],
'filegroup': ['default', 'symsrc'],
},
{ {
'filename': 'nacl_irt_x86_32.nexe', 'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'], 'arch': ['32bit'],
...@@ -702,11 +697,6 @@ FILES = [ ...@@ -702,11 +697,6 @@ FILES = [
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
'archive': 'chrome-win32-syms.zip', 'archive': 'chrome-win32-syms.zip',
}, },
{
'filename': 'ppGoogleNaClPluginChrome.dll.pdb',
'buildtype': ['dev', 'official'],
'archive': 'chrome-win32-syms.zip',
},
{ {
'filename': 'setup.exe.pdb', 'filename': 'setup.exe.pdb',
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
......
...@@ -52,9 +52,6 @@ ...@@ -52,9 +52,6 @@
'<(PRODUCT_DIR)/locales/fr.pak', '<(PRODUCT_DIR)/locales/fr.pak',
'<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)',
], ],
'isolate_dependency_touched': [
'<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
],
}, },
}], }],
['OS=="linux" or OS=="mac" or OS=="win"', { ['OS=="linux" or OS=="mac" or OS=="win"', {
......
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
'../base/base.gyp:base', '../base/base.gyp:base',
'../base/base.gyp:base_static', '../base/base.gyp:base_static',
'../ipc/ipc.gyp:ipc', '../ipc/ipc.gyp:ipc',
'../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
'../ppapi/ppapi_internal.gyp:ppapi_shared', '../ppapi/ppapi_internal.gyp:ppapi_shared',
'../ppapi/ppapi_internal.gyp:ppapi_ipc', '../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome', '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
...@@ -183,6 +182,7 @@ ...@@ -183,6 +182,7 @@
], ],
'dependencies': [ 'dependencies': [
'../content/content.gyp:content_renderer', '../content/content.gyp:content_renderer',
'../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
'../third_party/jsoncpp/jsoncpp.gyp:jsoncpp', '../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
'../third_party/WebKit/public/blink.gyp:blink', '../third_party/WebKit/public/blink.gyp:blink',
], ],
......
...@@ -54,6 +54,13 @@ source_set("ppapi_cpp") { ...@@ -54,6 +54,13 @@ source_set("ppapi_cpp") {
] ]
} }
source_set("ppapi_internal_module") {
sources = [
"cpp/private/internal_module.cc",
"cpp/private/internal_module.h",
]
}
source_set("ppapi_gles2") { source_set("ppapi_gles2") {
sources = [ sources = [
"lib/gl/gles2/gl2ext_ppapi.c", "lib/gl/gles2/gl2ext_ppapi.c",
......
// Copyright (c) 2014 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.
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/internal_module.h"
namespace pp {
namespace {
static Module* g_module_singleton = NULL;
} // namespace
Module* Module::Get() {
return g_module_singleton;
}
void InternalSetModuleSingleton(Module* module) {
g_module_singleton = module;
}
} // namespace pp
// Copyright (c) 2014 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 PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
#define PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
namespace pp {
class Module;
// Forcibly sets the value returned by pp::Module::Get(). Do not call this
// function except to support the trusted plugin or the remoting plugin!
void InternalSetModuleSingleton(Module* module);
}
#endif // PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>ppNaClPlugin</string>
<key>CFBundleIdentifier</key>
<string>com.google.ppNaClPlugin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>nacl</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
<string>NO</string>
<key>CFPlugInUnloadFunction</key>
<string></string>
<key>WebPluginDescription</key>
<string>ppNaClPlugin</string>
<key>NSPrincipalClass</key>
<string>ppNaClPlugin</string>
<key>WebPluginMIMETypes</key>
<dict>
<key>application/x-nacl</key>
<dict>
<key>WebPluginTypeDescription</key>
<string>PPAPI Native Client SimpleRPC interaction</string>
<key>WebPluginExtensions</key>
<array>
<string>nexe,nacl</string>
</array>
</dict>
</dict>
<key>WebPluginName</key>
<string>Google Native Client Plugin</string>
</dict>
</plist>
#include <CoreServices/CoreServices.r>
resource 'STR#' (126) { {
"PPAPI NativeClient",
"PPAPI NativeClient Plug-in"
} };
resource 'STR#' (127) { {
"PPAPI NativeClient Module - SRPC",
} };
resource 'STR#' (128) { {
"application/x-nacl",
"nexe",
} };
...@@ -7,57 +7,13 @@ ...@@ -7,57 +7,13 @@
'includes': [ 'includes': [
'plugin.gypi', 'plugin.gypi',
], ],
'target_defaults': {
'variables': {
'target_base': 'none',
},
'target_conditions': [
['target_base=="ppNaClPlugin"', {
'sources': [
'<@(common_sources)',
],
'xcode_settings': {
'WARNING_CFLAGS!': [
# TODO(bradnelson): remove -pedantic when --std=c++98 in common.gypi
'-pedantic',
],
'WARNING_CFLAGS': [
'-Wno-deprecated',
'-Wno-deprecated-declarations',
],
},
'conditions': [
['OS=="win"', {
'sources': [
'win/nacl_plugin.rc',
],
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': '2', # /EHsc
},
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
'$(OutDir)/lib',
],
},
},
}],
],
}],
],
},
'targets': [ 'targets': [
{ {
'target_name': 'ppGoogleNaClPluginChrome', 'target_name': 'nacl_trusted_plugin',
'type': 'loadable_module', 'type': 'static_library',
'sources': [ 'sources': [
'<@(common_sources)', '<@(common_sources)',
], ],
'xcode_settings': {
'OTHER_LDFLAGS': [
'-Wl,-exported_symbols_list <(DEPTH)/ppapi/native_client/src/trusted/plugin/ppapi.def'
],
},
'dependencies': [ 'dependencies': [
'<(DEPTH)/media/media.gyp:shared_memory_support', '<(DEPTH)/media/media.gyp:shared_memory_support',
'<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio', '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio',
...@@ -65,26 +21,14 @@ ...@@ -65,26 +21,14 @@
'<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform', '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
'<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:nonnacl_srpc', '<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:nonnacl_srpc',
'<(DEPTH)/native_client/src/trusted/desc/desc.gyp:nrd_xfer', '<(DEPTH)/native_client/src/trusted/desc/desc.gyp:nrd_xfer',
'<(DEPTH)/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp:nonnacl_util', '<(DEPTH)/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp:sel_ldr_launcher_base',
'<(DEPTH)/native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib', '<(DEPTH)/native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
'<(DEPTH)/native_client/src/trusted/gio/gio_wrapped_desc.gyp:gio_wrapped_desc', '<(DEPTH)/native_client/src/trusted/gio/gio_wrapped_desc.gyp:gio_wrapped_desc',
'<(DEPTH)/native_client/src/trusted/simple_service/simple_service.gyp:simple_service', '<(DEPTH)/native_client/src/trusted/simple_service/simple_service.gyp:simple_service',
'<(DEPTH)/native_client/src/trusted/reverse_service/reverse_service.gyp:reverse_service', '<(DEPTH)/native_client/src/trusted/reverse_service/reverse_service.gyp:reverse_service',
'<(DEPTH)/native_client/src/trusted/weak_ref/weak_ref.gyp:weak_ref', '<(DEPTH)/native_client/src/trusted/weak_ref/weak_ref.gyp:weak_ref',
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp_objects',
], '<(DEPTH)/ppapi/ppapi.gyp:ppapi_internal_module',
'conditions': [
['OS=="mac"', {
'mac_bundle': 1,
'product_name': 'ppGoogleNaClPluginChrome',
'product_extension': 'plugin',
}],
['OS=="mac" and mac_breakpad==1', {
'variables': {
# A real .dSYM is needed for dump_syms to operate on.
'mac_real_dsym': 1,
},
}],
], ],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ], 'msvs_disabled_warnings': [4267, ],
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
'pnacl_coordinator.cc', 'pnacl_coordinator.cc',
'pnacl_resources.cc', 'pnacl_resources.cc',
'pnacl_translate_thread.cc', 'pnacl_translate_thread.cc',
'ppapi_entrypoints.cc',
'sel_ldr_launcher_chrome.cc', 'sel_ldr_launcher_chrome.cc',
'service_runtime.cc', 'service_runtime.cc',
'srpc_client.cc', 'srpc_client.cc',
......
_PPP_GetInterface
_PPP_InitializeModule
_PPP_ShutdownModule
// Copyright (c) 2014 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.
#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/ppb.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/internal_module.h"
#include "ppapi/native_client/src/trusted/plugin/module_ppapi.h"
namespace nacl_plugin {
int32_t PPP_InitializeModule(PP_Module module_id,
PPB_GetInterface get_browser_interface) {
plugin::ModulePpapi* module = new plugin::ModulePpapi();
if (!module->InternalInit(module_id, get_browser_interface)) {
delete module;
return PP_ERROR_FAILED;
}
pp::InternalSetModuleSingleton(module);
return PP_OK;
}
void PPP_ShutdownModule() {
delete pp::Module::Get();
pp::InternalSetModuleSingleton(NULL);
}
const void* PPP_GetInterface(const char* interface_name) {
if (!pp::Module::Get())
return NULL;
return pp::Module::Get()->GetPluginInterface(interface_name);
}
} // namespace nacl_plugin
// Copyright (c) 2014 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 PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
#define PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
#include "ppapi/c/pp_module.h"
#include "ppapi/c/ppb.h"
// Provides entry points for the trusted plugin.
namespace nacl_plugin {
int PPP_InitializeModule(PP_Module module,
PPB_GetInterface get_browser_interface);
const void* PPP_GetInterface(const char* interface_name);
void PPP_ShutdownModule();
} // namespace nacl_plugin
#endif // PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
// Microsoft Visual C++ generated resource script.
//
// #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "FileDescription", "NativeClient Execution Environment"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "nacl_plugin"
VALUE "LegalCopyright", "Copyright (C) 2007, 2008"
VALUE "MIMEType", "application/x-nacl"
VALUE "OriginalFilename", "nacl_plugin.dll"
VALUE "ProductName", "NativeClient Execution Environment"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
], ],
}, },
{ {
# GN version: //ppapi:ppapi_cpp_pbjects # GN version: //ppapi:ppapi_cpp_objects
'target_name': 'ppapi_cpp_objects', 'target_name': 'ppapi_cpp_objects',
'type': 'static_library', 'type': 'static_library',
'dependencies': [ 'dependencies': [
...@@ -83,5 +83,17 @@ ...@@ -83,5 +83,17 @@
}] }]
], ],
}, },
{
# GN version: //ppapi:ppapi_internal_module
'target_name': 'ppapi_internal_module',
'type': 'static_library',
'include_dirs+': [
'..',
],
'sources': [
'cpp/private/internal_module.cc',
'cpp/private/internal_module.h',
]
},
], ],
} }
...@@ -11,18 +11,9 @@ ...@@ -11,18 +11,9 @@
#include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_instance.h"
#include "ppapi/cpp/instance.h" #include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h" #include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/internal_module.h"
#include "remoting/client/plugin/chromoting_instance.h" #include "remoting/client/plugin/chromoting_instance.h"
static pp::Module* g_module_singleton = NULL;
namespace pp {
Module* Module::Get() {
return g_module_singleton;
}
} // namespace pp
namespace remoting { namespace remoting {
class ChromotingModule : public pp::Module { class ChromotingModule : public pp::Module {
...@@ -46,13 +37,13 @@ int32_t PPP_InitializeModule(PP_Module module_id, ...@@ -46,13 +37,13 @@ int32_t PPP_InitializeModule(PP_Module module_id,
ChromotingInstance::RegisterLogMessageHandler(); ChromotingInstance::RegisterLogMessageHandler();
#endif #endif
g_module_singleton = module; pp::InternalSetModuleSingleton(module);
return PP_OK; return PP_OK;
} }
void PPP_ShutdownModule() { void PPP_ShutdownModule() {
delete pp::Module::Get(); delete pp::Module::Get();
g_module_singleton = NULL; pp::InternalSetModuleSingleton(NULL);
} }
const void* PPP_GetInterface(const char* interface_name) { const void* PPP_GetInterface(const char* interface_name) {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
'dependencies': [ 'dependencies': [
'../net/net.gyp:net', '../net/net.gyp:net',
'../ppapi/ppapi.gyp:ppapi_cpp_objects', '../ppapi/ppapi.gyp:ppapi_cpp_objects',
'../ppapi/ppapi.gyp:ppapi_internal_module',
'../third_party/webrtc/modules/modules.gyp:desktop_capture', '../third_party/webrtc/modules/modules.gyp:desktop_capture',
'../ui/events/events.gyp:dom4_keycode_converter', '../ui/events/events.gyp:dom4_keycode_converter',
'remoting_base', 'remoting_base',
......
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