diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/default_plugin.cc | 23 | ||||
-rw-r--r-- | chrome/common/gpu_plugin.cc | 25 |
2 files changed, 18 insertions, 30 deletions
diff --git a/chrome/common/default_plugin.cc b/chrome/common/default_plugin.cc index 3337c7c..61bbc87 100644 --- a/chrome/common/default_plugin.cc +++ b/chrome/common/default_plugin.cc @@ -10,25 +10,20 @@ namespace chrome { void RegisterInternalDefaultPlugin() { - const webkit::npapi::PluginVersionInfo default_plugin = { - FilePath(webkit::npapi::kDefaultPluginLibraryName), - L"Default Plug-in", - L"Provides functionality for installing third-party plug-ins", - L"1", - L"*", - L"", - L"", - { + const webkit::npapi::PluginEntryPoints entry_points = { #if !defined(OS_POSIX) || defined(OS_MACOSX) - default_plugin::NP_GetEntryPoints, + default_plugin::NP_GetEntryPoints, #endif - default_plugin::NP_Initialize, - default_plugin::NP_Shutdown - } + default_plugin::NP_Initialize, + default_plugin::NP_Shutdown }; webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( - default_plugin); + FilePath(webkit::npapi::kDefaultPluginLibraryName), + "Default Plug-in", + "Provides functionality for installing third-party plug-ins", + "*", + entry_points); } } // namespace chrome diff --git a/chrome/common/gpu_plugin.cc b/chrome/common/gpu_plugin.cc index 4600638..fd4c680 100644 --- a/chrome/common/gpu_plugin.cc +++ b/chrome/common/gpu_plugin.cc @@ -15,28 +15,21 @@ namespace chrome { void RegisterInternalGPUPlugin() { #if defined(ENABLE_GPU) - static const std::wstring kWideMimeType = ASCIIToWide( - "application/vnd.google.chrome.gpu-plugin"); - static const webkit::npapi::PluginVersionInfo kGPUPluginInfo = { - FilePath(FILE_PATH_LITERAL("gpu-plugin")), - L"GPU Plug-in", - L"GPU Rendering Plug-in", - L"1", - kWideMimeType.c_str(), - L"", - L"", - { + const webkit::npapi::PluginEntryPoints entry_points = { #if !defined(OS_POSIX) || defined(OS_MACOSX) - gpu_plugin::NP_GetEntryPoints, + gpu_plugin::NP_GetEntryPoints, #endif - gpu_plugin::NP_Initialize, - gpu_plugin::NP_Shutdown - } + gpu_plugin::NP_Initialize, + gpu_plugin::NP_Shutdown }; if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin)) webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( - kGPUPluginInfo); + FilePath(FILE_PATH_LITERAL("gpu-plugin")), + "GPU Plug-in", + "GPU Rendering Plug-in", + "application/vnd.google.chrome.gpu-plugin", + entry_points); #endif // ENABLE_GPU } |