diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-05 19:53:20 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-05 19:53:20 +0000 |
commit | 01167110d8b34bdefbe95cd1bc2f02205f43b991 (patch) | |
tree | bb5e9a22ab76c4b067e2adfcec06ced5a249c4ad /ppapi/cpp | |
parent | 324b3a1c3b9925d4e85e3b288a77ea3e0e946eb0 (diff) | |
download | chromium_src-01167110d8b34bdefbe95cd1bc2f02205f43b991.zip chromium_src-01167110d8b34bdefbe95cd1bc2f02205f43b991.tar.gz chromium_src-01167110d8b34bdefbe95cd1bc2f02205f43b991.tar.bz2 |
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
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/private/internal_module.cc | 21 | ||||
-rw-r--r-- | ppapi/cpp/private/internal_module.h | 16 |
2 files changed, 37 insertions, 0 deletions
diff --git a/ppapi/cpp/private/internal_module.cc b/ppapi/cpp/private/internal_module.cc new file mode 100644 index 0000000..1615e87 --- /dev/null +++ b/ppapi/cpp/private/internal_module.cc @@ -0,0 +1,21 @@ +// 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 diff --git a/ppapi/cpp/private/internal_module.h b/ppapi/cpp/private/internal_module.h new file mode 100644 index 0000000..5bc4191 --- /dev/null +++ b/ppapi/cpp/private/internal_module.h @@ -0,0 +1,16 @@ +// 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_ |