| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/plugins/npapi/plugin_lib.h" | 5 #include "webkit/plugins/npapi/plugin_lib.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #if defined(OS_OPENBSD) | 8 #if defined(OS_OPENBSD) |
| 9 #include <sys/exec_elf.h> | 9 #include <sys/exec_elf.h> |
| 10 #else | 10 #else |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 void* dl = base::LoadNativeLibrary(filename); | 153 void* dl = base::LoadNativeLibrary(filename); |
| 154 if (!dl) { | 154 if (!dl) { |
| 155 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 155 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
| 156 << "While reading plugin info, unable to load library " | 156 << "While reading plugin info, unable to load library " |
| 157 << filename.value() << ", skipping."; | 157 << filename.value() << ", skipping."; |
| 158 return false; | 158 return false; |
| 159 } | 159 } |
| 160 | 160 |
| 161 info->path = filename; | 161 info->path = filename; |
| 162 info->enabled = true; | 162 info->enabled = WebPluginInfo::USER_ENABLED; |
| 163 | 163 |
| 164 // Attempt to swap in the wrapped plugin if this is nspluginwrapper. | 164 // Attempt to swap in the wrapped plugin if this is nspluginwrapper. |
| 165 UnwrapNSPluginWrapper(&dl, &info->path); | 165 UnwrapNSPluginWrapper(&dl, &info->path); |
| 166 | 166 |
| 167 // See comments in plugin_lib_mac regarding this symbol. | 167 // See comments in plugin_lib_mac regarding this symbol. |
| 168 typedef const char* (*NP_GetMimeDescriptionType)(); | 168 typedef const char* (*NP_GetMimeDescriptionType)(); |
| 169 NP_GetMimeDescriptionType NP_GetMIMEDescription = | 169 NP_GetMimeDescriptionType NP_GetMIMEDescription = |
| 170 reinterpret_cast<NP_GetMimeDescriptionType>( | 170 reinterpret_cast<NP_GetMimeDescriptionType>( |
| 171 dlsym(dl, "NP_GetMIMEDescription")); | 171 dlsym(dl, "NP_GetMIMEDescription")); |
| 172 const char* mime_description = NULL; | 172 const char* mime_description = NULL; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 break; | 287 break; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 if (!version.empty()) { | 290 if (!version.empty()) { |
| 291 info->version = UTF8ToUTF16(version); | 291 info->version = UTF8ToUTF16(version); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace npapi | 295 } // namespace npapi |
| 296 } // namespace webkit | 296 } // namespace webkit |
| OLD | NEW |