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

Unified Diff: webkit/glue/plugins/plugin_lib_mac.mm

Issue 87012: plugins: move NativeLibrary into base. (Closed)
Patch Set: more fixes from trybot Created 11 years, 8 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: webkit/glue/plugins/plugin_lib_mac.mm
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm
index a12a6263784c0f8003ccc20efacf2ef2ff2917d7..04510a4a7e1acfb28e1b3dc6aeb623ac0946ccfc 100644
--- a/webkit/glue/plugins/plugin_lib_mac.mm
+++ b/webkit/glue/plugins/plugin_lib_mac.mm
@@ -20,32 +20,6 @@ static const short kSTRPluginDescriptionResourceID = 126;
namespace NPAPI
{
-/* static */
-PluginLib::NativeLibrary PluginLib::LoadNativeLibrary(
- const FilePath& library_path) {
- scoped_cftyperef<CFURLRef> url(CFURLCreateFromFileSystemRepresentation(
- kCFAllocatorDefault,
- (const UInt8*)library_path.value().c_str(),
- library_path.value().length(),
- true));
- if (!url)
- return NULL;
-
- return CFBundleCreate(kCFAllocatorDefault, url.get());
-}
-
-/* static */
-void PluginLib::UnloadNativeLibrary(NativeLibrary library) {
- CFRelease(library);
-}
-
-/* static */
-void* PluginLib::GetFunctionPointerFromNativeLibrary(
- NativeLibrary library,
- NativeLibraryFunctionNameType name) {
- return CFBundleGetFunctionPointerForName(library, name);
-}
-
namespace {
NSDictionary* GetMIMETypes(CFBundleRef bundle) {
@@ -322,7 +296,7 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
//
// Strictly speaking, only STR# 128 is required.
- scoped_cftyperef<CFBundleRef> bundle(LoadNativeLibrary(filename));
+ scoped_cftyperef<CFBundleRef> bundle(base::LoadNativeLibrary(filename));
if (!bundle)
return false;

Powered by Google App Engine
This is Rietveld 408576698