Index: chrome/browser/plugin_service.cc |
=================================================================== |
--- chrome/browser/plugin_service.cc (revision 69426) |
+++ chrome/browser/plugin_service.cc (working copy) |
@@ -34,12 +34,13 @@ |
#include "chrome/common/plugin_messages.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/render_messages.h" |
+#include "webkit/plugins/npapi/plugin_constants_win.h" |
+#include "webkit/plugins/npapi/plugin_list.h" |
+#include "webkit/plugins/npapi/webplugininfo.h" |
+ |
#ifndef DISABLE_NACL |
#include "native_client/src/trusted/plugin/nacl_entry_points.h" |
#endif |
-#include "webkit/glue/plugins/plugin_constants_win.h" |
-#include "webkit/glue/plugins/plugin_list.h" |
-#include "webkit/glue/plugins/webplugininfo.h" |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/plugin_selection_policy.h" |
@@ -69,7 +70,7 @@ |
if (CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisableOutdatedPlugins)) { |
- NPAPI::PluginList::Singleton()->DisableOutdatedPluginGroups(); |
+ webkit::npapi::PluginList::Singleton()->DisableOutdatedPluginGroups(); |
} |
// Have Chrome plugins write their data to the profile directory. |
@@ -99,10 +100,10 @@ |
const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
FilePath path = command_line->GetSwitchValuePath(switches::kLoadPlugin); |
if (!path.empty()) |
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); |
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); |
path = command_line->GetSwitchValuePath(switches::kExtraPluginDir); |
if (!path.empty()) |
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(path); |
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path); |
chrome::RegisterInternalDefaultPlugin(); |
@@ -110,7 +111,7 @@ |
if (!CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisableInternalFlash) && |
PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { |
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); |
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); |
} |
#ifndef DISABLE_NACL |
@@ -145,7 +146,7 @@ |
// e.g. ~/.config/chromium/Plugins. |
FilePath user_data_dir; |
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
- NPAPI::PluginList::Singleton()->AddExtraPluginDir( |
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir( |
user_data_dir.Append("Plugins")); |
} |
#endif |
@@ -217,9 +218,9 @@ |
if (plugin_host) |
return plugin_host; |
- WebPluginInfo info; |
- if (!NPAPI::PluginList::Singleton()->GetPluginInfoByPath( |
- plugin_path, &info)) { |
+ webkit::npapi::WebPluginInfo info; |
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( |
+ plugin_path, &info)) { |
return NULL; |
} |
@@ -251,7 +252,7 @@ |
const std::string& mime_type, |
PluginProcessHost::Client* client) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
- WebPluginInfo info; |
+ webkit::npapi::WebPluginInfo info; |
bool found = GetFirstAllowedPluginInfo(url, mime_type, &info, NULL); |
FilePath plugin_path; |
if (found && info.enabled) |
@@ -280,16 +281,16 @@ |
bool PluginService::GetFirstAllowedPluginInfo( |
const GURL& url, |
const std::string& mime_type, |
- WebPluginInfo* info, |
+ webkit::npapi::WebPluginInfo* info, |
std::string* actual_mime_type) { |
// GetPluginInfoArray may need to load the plugins, so we need to be |
// on the FILE thread. |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
bool allow_wildcard = true; |
#if defined(OS_CHROMEOS) |
- std::vector<WebPluginInfo> info_array; |
+ std::vector<webkit::npapi::WebPluginInfo> info_array; |
std::vector<std::string> actual_mime_types; |
- NPAPI::PluginList::Singleton()->GetPluginInfoArray( |
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( |
url, mime_type, allow_wildcard, &info_array, &actual_mime_types); |
// Now we filter by the plugin selection policy. |
@@ -303,7 +304,7 @@ |
} |
return false; |
#else |
- return NPAPI::PluginList::Singleton()->GetPluginInfo( |
+ return webkit::npapi::PluginList::Singleton()->GetPluginInfo( |
url, mime_type, allow_wildcard, info, actual_mime_type); |
#endif |
} |
@@ -324,7 +325,7 @@ |
hklm_key_.StartWatching(); |
} |
- NPAPI::PluginList::Singleton()->RefreshPlugins(); |
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
PurgePluginListCache(true); |
#endif // defined(OS_WIN) |
} |
@@ -345,8 +346,8 @@ |
bool plugins_changed = false; |
for (size_t i = 0; i < extension->plugins().size(); ++i) { |
const Extension::PluginInfo& plugin = extension->plugins()[i]; |
- NPAPI::PluginList::Singleton()->RefreshPlugins(); |
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(plugin.path); |
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(plugin.path); |
plugins_changed = true; |
if (!plugin.is_public) |
private_plugins_[plugin.path] = extension->url(); |
@@ -364,8 +365,9 @@ |
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
NewRunnableFunction(&ForceShutdownPlugin, |
plugin.path)); |
- NPAPI::PluginList::Singleton()->RefreshPlugins(); |
- NPAPI::PluginList::Singleton()->RemoveExtraPluginPath(plugin.path); |
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
+ webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath( |
+ plugin.path); |
plugins_changed = true; |
if (!plugin.is_public) |
private_plugins_.erase(plugin.path); |
@@ -412,7 +414,7 @@ |
std::vector<PepperPluginInfo> plugins; |
PepperPluginRegistry::GetList(&plugins); |
for (size_t i = 0; i < plugins.size(); ++i) { |
- NPAPI::PluginVersionInfo info; |
+ webkit::npapi::PluginVersionInfo info; |
info.path = plugins[i].path; |
info.product_name = plugins[i].name.empty() ? |
plugins[i].path.BaseName().ToWStringHack() : |
@@ -427,6 +429,6 @@ |
// or perhaps refactor the PluginList to be less specific to NPAPI. |
memset(&info.entry_points, 0, sizeof(info.entry_points)); |
- NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); |
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); |
} |
} |