diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 00:56:07 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 00:56:07 +0000 |
commit | f38e25f12f542ed26b0b9d310d2e432297520995 (patch) | |
tree | 91968df6d61551cadf4ec12152f9790e5904f1b5 /webkit/glue/plugins/plugin_lib.h | |
parent | 53e45f18ee44a3b7ace0ebf96960c1af9f8f1ae6 (diff) | |
download | chromium_src-f38e25f12f542ed26b0b9d310d2e432297520995.zip chromium_src-f38e25f12f542ed26b0b9d310d2e432297520995.tar.gz chromium_src-f38e25f12f542ed26b0b9d310d2e432297520995.tar.bz2 |
plugins: move NativeLibrary into base.
NativeLibrary is used by some plugin code under chrome/.
Rather than including webkit/glue there, this relocation is the smallest
logical bite to take. :\
Review URL: http://codereview.chromium.org/87012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_lib.h')
-rw-r--r-- | webkit/glue/plugins/plugin_lib.h | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h index 0b44212..46b5b01 100644 --- a/webkit/glue/plugins/plugin_lib.h +++ b/webkit/glue/plugins/plugin_lib.h @@ -5,13 +5,12 @@ #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H__ #define WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H__ -#include "build/build_config.h" - #include <string> #include <vector> #include "base/basictypes.h" #include "base/file_path.h" +#include "base/native_library.h" #include "base/ref_counted.h" #include "webkit/glue/plugins/plugin_list.h" #include "webkit/glue/webplugin.h" @@ -83,37 +82,10 @@ class PluginLib : public base::RefCounted<PluginLib> { // Shutdown the plugin library. void Shutdown(); - public: -#if defined(OS_WIN) - typedef HMODULE NativeLibrary; - typedef char* NativeLibraryFunctionNameType; -#define FUNCTION_NAME(x) x -#elif defined(OS_MACOSX) - typedef CFBundleRef NativeLibrary; - typedef CFStringRef NativeLibraryFunctionNameType; -#define FUNCTION_NAME(x) CFSTR(x) -#elif defined(OS_LINUX) - typedef void* NativeLibrary; - typedef const char* NativeLibraryFunctionNameType; -#define FUNCTION_NAME(x) x -#endif // OS_* - - // Loads a native library from disk. NOTE: You must release it with - // UnloadNativeLibrary when you're done. - static NativeLibrary LoadNativeLibrary(const FilePath& library_path); - - // Unloads a native library. - static void UnloadNativeLibrary(NativeLibrary library); - private: - // Gets a function pointer from a native library. - static void* GetFunctionPointerFromNativeLibrary( - NativeLibrary library, - NativeLibraryFunctionNameType name); - bool internal_; // Whether this an internal plugin. WebPluginInfo web_plugin_info_; // supported mime types, description - NativeLibrary library_; // the opened library reference + base::NativeLibrary library_; // the opened library reference NPPluginFuncs plugin_funcs_; // the struct of plugin side functions bool initialized_; // is the plugin initialized NPSavedData *saved_data_; // persisted plugin info for NPAPI |