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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 397243004: Pepper: Remove trusted plugin loadable module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index ca71eac4010c82cd5cc35947f7e389ebc58a302a..3885892b0f07c6efb62c77a5cdb38b2575d90b00 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -33,6 +33,7 @@
#include "extensions/common/constants.h"
#include "gpu/config/gpu_info.h"
#include "grit/common_resources.h"
+#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/layout.h"
@@ -171,28 +172,30 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
// isn't set. For other uses of NaCl we check for the command line switch.
// Specifically, Portable Native Client is only enabled by the command line
// switch.
- static bool skip_nacl_file_check = false;
if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) {
- if (skip_nacl_file_check || base::PathExists(path)) {
- content::PepperPluginInfo nacl;
- nacl.path = path;
- nacl.name = ChromeContentClient::kNaClPluginName;
- content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
- kNaClPluginExtension,
- kNaClPluginDescription);
- nacl.mime_types.push_back(nacl_mime_type);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisablePnacl)) {
- content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType,
- kPnaclPluginExtension,
- kPnaclPluginDescription);
- nacl.mime_types.push_back(pnacl_mime_type);
- }
- nacl.permissions = kNaClPluginPermissions;
- plugins->push_back(nacl);
-
- skip_nacl_file_check = true;
+ content::PepperPluginInfo nacl;
+ // The nacl plugin is now built into the Chromium binary.
+ nacl.is_internal = true;
+ nacl.path = path;
+ nacl.name = ChromeContentClient::kNaClPluginName;
+ content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
+ kNaClPluginExtension,
+ kNaClPluginDescription);
+ nacl.mime_types.push_back(nacl_mime_type);
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisablePnacl)) {
+ content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType,
+ kPnaclPluginExtension,
+ kPnaclPluginDescription);
+ nacl.mime_types.push_back(pnacl_mime_type);
}
+ nacl.internal_entry_points.get_interface = nacl_plugin::PPP_GetInterface;
+ nacl.internal_entry_points.initialize_module =
+ nacl_plugin::PPP_InitializeModule;
+ nacl.internal_entry_points.shutdown_module =
+ nacl_plugin::PPP_ShutdownModule;
+ nacl.permissions = kNaClPluginPermissions;
+ plugins->push_back(nacl);
}
static bool skip_o1d_file_check = false;
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/chrome_paths.cc » ('j') | chrome/common/chrome_paths.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698