summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 21:20:32 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 21:20:32 +0000
commit753a1b1e2158c6c4ab6ce0f65f5b7e9208e3c73b (patch)
tree250fd65af314366dcce94d856f74cda639eb094c /ppapi/native_client
parent3c254b86ec4c6ad714f7c2cb3eec768765b0098d (diff)
downloadchromium_src-753a1b1e2158c6c4ab6ce0f65f5b7e9208e3c73b.zip
chromium_src-753a1b1e2158c6c4ab6ce0f65f5b7e9208e3c73b.tar.gz
chromium_src-753a1b1e2158c6c4ab6ce0f65f5b7e9208e3c73b.tar.bz2
Revert "Pepper: Remove trusted plugin loadable module."
The reverted change broke the ChromeOS builder, which depends on the loadable module file existing. Argh. This reverts commit b0b91c06bc2ed6afc0611f00d68f72b19dd06d26. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist46
-rw-r--r--ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r15
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.gyp66
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.gypi1
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi.def3
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc39
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h21
-rw-r--r--ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc102
8 files changed, 227 insertions, 66 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist b/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist
new file mode 100644
index 0000000..b066504
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist
@@ -0,0 +1,46 @@
+<?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>
diff --git a/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r b/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r
new file mode 100644
index 0000000..af3f807
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r
@@ -0,0 +1,15 @@
+#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",
+} };
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.gyp b/ppapi/native_client/src/trusted/plugin/plugin.gyp
index 843f2042..343883d 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.gyp
+++ b/ppapi/native_client/src/trusted/plugin/plugin.gyp
@@ -7,13 +7,57 @@
'includes': [
'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': [
{
- 'target_name': 'nacl_trusted_plugin',
- 'type': 'static_library',
+ 'target_name': 'ppGoogleNaClPluginChrome',
+ 'type': 'loadable_module',
'sources': [
'<@(common_sources)',
],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-exported_symbols_list <(DEPTH)/ppapi/native_client/src/trusted/plugin/ppapi.def'
+ ],
+ },
'dependencies': [
'<(DEPTH)/media/media.gyp:shared_memory_support',
'<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio',
@@ -21,14 +65,26 @@
'<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
'<(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/nonnacl_util/nonnacl_util.gyp:sel_ldr_launcher_base',
+ '<(DEPTH)/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp:nonnacl_util',
'<(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/simple_service/simple_service.gyp:simple_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)/ppapi/ppapi.gyp:ppapi_cpp_objects',
- '<(DEPTH)/ppapi/ppapi.gyp:ppapi_internal_module',
+ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
+ ],
+ '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.
'msvs_disabled_warnings': [4267, ],
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.gypi b/ppapi/native_client/src/trusted/plugin/plugin.gypi
index aa8f3ac..a29fac1 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.gypi
+++ b/ppapi/native_client/src/trusted/plugin/plugin.gypi
@@ -12,7 +12,6 @@
'pnacl_coordinator.cc',
'pnacl_resources.cc',
'pnacl_translate_thread.cc',
- 'ppapi_entrypoints.cc',
'sel_ldr_launcher_chrome.cc',
'service_runtime.cc',
'srpc_client.cc',
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi.def b/ppapi/native_client/src/trusted/plugin/ppapi.def
new file mode 100644
index 0000000..b9643e8
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/ppapi.def
@@ -0,0 +1,3 @@
+_PPP_GetInterface
+_PPP_InitializeModule
+_PPP_ShutdownModule
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc
deleted file mode 100644
index 51f4f57..0000000
--- a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h
deleted file mode 100644
index 6681c2e..0000000
--- a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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_
diff --git a/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc b/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc
new file mode 100644
index 0000000..4dd3354
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc
@@ -0,0 +1,102 @@
+// 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
+