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

Unified Diff: webkit/glue/plugins/plugin_lib.h

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.h
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h
index 0b44212f36257b9a387edbf5144c9fb02c0575f7..46b5b0161c036b296f63ac0905a305d2221d3291 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

Powered by Google App Engine
This is Rietveld 408576698