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

Unified Diff: webkit/glue/plugins/plugin_lib_win.cc

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
« base/native_library_linux.cc ('K') | « webkit/glue/plugins/plugin_lib_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_lib_win.cc
diff --git a/webkit/glue/plugins/plugin_lib_win.cc b/webkit/glue/plugins/plugin_lib_win.cc
index 208896a8395be63d98c88f7e3215639f871011b4..18a687dd3b963ec2ba8c35b8702bb7129f8799c1 100644
--- a/webkit/glue/plugins/plugin_lib_win.cc
+++ b/webkit/glue/plugins/plugin_lib_win.cc
@@ -13,41 +13,6 @@
namespace NPAPI
{
-
-/* static */
-PluginLib::NativeLibrary PluginLib::LoadNativeLibrary(
- const FilePath& library_path) {
- // Switch the current directory to the plugin directory as the plugin
- // may have dependencies on dlls in this directory.
- bool restore_directory = false;
- std::wstring current_directory;
- if (PathService::Get(base::DIR_CURRENT, &current_directory)) {
- FilePath plugin_path = library_path.DirName();
- if (!plugin_path.value().empty()) {
- PathService::SetCurrentDirectory(plugin_path.value());
- restore_directory = true;
- }
- }
-
- HMODULE module = LoadLibrary(library_path.value().c_str());
- if (restore_directory)
- PathService::SetCurrentDirectory(current_directory);
-
- return module;
-}
-
-/* static */
-void PluginLib::UnloadNativeLibrary(NativeLibrary library) {
- FreeLibrary(library);
-}
-
-/* static */
-void* PluginLib::GetFunctionPointerFromNativeLibrary(
- NativeLibrary library,
- NativeLibraryFunctionNameType name) {
- return GetProcAddress(library, name);
-}
-
bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
WebPluginInfo* info) {
// On windows, the way we get the mime types for the library is
« base/native_library_linux.cc ('K') | « webkit/glue/plugins/plugin_lib_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698