diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 00:43:44 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 00:43:44 +0000 |
commit | f99c73ade9f93c7257e74992f2e540cb8319c1ad (patch) | |
tree | 3f5683ab851f1dceaef14a8f17fcdbac162ba84b /chrome/common | |
parent | 036d83894fc084e0d05cc98fcf992505800f0c8c (diff) | |
download | chromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.zip chromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.tar.gz chromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.tar.bz2 |
glue: deprecate npapi::PluginVersionInfo
Add new entry points to RegisterInternalPlugin that take the appropriate
arguments. Currently they just call into the old version of the function.
I intend to remove this function completely, but NaCl still depends on the
existing API, so this is the first change while I shuffle depedencies around.
TEST=compiles
Review URL: http://codereview.chromium.org/6161004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70972 0039d316-1c4b-4281-b951-d872f2087c98
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 } |