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

Unified Diff: chrome/browser/plugin_updater.cc

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/browser/plugin_updater.h ('k') | chrome/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_updater.cc
===================================================================
--- chrome/browser/plugin_updater.cc (revision 69426)
+++ chrome/browser/plugin_updater.cc (working copy)
@@ -22,7 +22,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pepper_plugin_registry.h"
#include "chrome/common/pref_names.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
// How long to wait to save the plugin enabled information, which might need to
// go to disk.
@@ -34,7 +35,7 @@
}
DictionaryValue* PluginUpdater::CreatePluginFileSummary(
- const WebPluginInfo& plugin) {
+ const webkit::npapi::WebPluginInfo& plugin) {
DictionaryValue* data = new DictionaryValue();
data->SetString("path", plugin.path.value());
data->SetString("name", plugin.name);
@@ -45,8 +46,8 @@
// static
ListValue* PluginUpdater::GetPluginGroupsData() {
- std::vector<PluginGroup> plugin_groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
+ std::vector<webkit::npapi::PluginGroup> plugin_groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
// Construct DictionaryValues to return to the UI
ListValue* plugin_groups_data = new ListValue();
@@ -57,19 +58,20 @@
}
void PluginUpdater::EnablePluginGroup(bool enable, const string16& group_name) {
- if (PluginGroup::IsPluginNameDisabledByPolicy(group_name))
+ if (webkit::npapi::PluginGroup::IsPluginNameDisabledByPolicy(group_name))
enable = false;
- NPAPI::PluginList::Singleton()->EnableGroup(enable, group_name);
+ webkit::npapi::PluginList::Singleton()->EnableGroup(enable, group_name);
NotifyPluginStatusChanged();
}
void PluginUpdater::EnablePluginFile(bool enable,
const FilePath::StringType& path) {
FilePath file_path(path);
- if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path))
- NPAPI::PluginList::Singleton()->EnablePlugin(file_path);
+ if (enable &&
+ !webkit::npapi::PluginGroup::IsPluginPathDisabledByPolicy(file_path))
+ webkit::npapi::PluginList::Singleton()->EnablePlugin(file_path);
else
- NPAPI::PluginList::Singleton()->DisablePlugin(file_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(file_path);
NotifyPluginStatusChanged();
}
@@ -105,7 +107,8 @@
}
}
}
- PluginGroup::SetPolicyDisabledPluginPatterns(policy_disabled_plugin_patterns);
+ webkit::npapi::PluginGroup::SetPolicyDisabledPluginPatterns(
+ policy_disabled_plugin_patterns);
NotifyPluginStatusChanged();
}
@@ -190,7 +193,7 @@
}
}
if (!enabled)
- NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_path);
} else if (!enabled && plugin->GetString("name", &group_name)) {
// Don't disable this group if it's for the pdf plugin and we just
// forced it on.
@@ -213,13 +216,14 @@
!force_internal_pdf_for_this_run) {
// The internal PDF plugin is disabled by default, and the user hasn't
// overridden the default.
- NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(pdf_path);
EnablePluginGroup(false, pdf_group_name);
}
if (force_enable_internal_pdf) {
// See http://crbug.com/50105 for background.
- EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
+ EnablePluginGroup(false, ASCIIToUTF16(
+ webkit::npapi::PluginGroup::kAdobeReaderGroupName));
// We want to save this, but doing so requires loading the list of plugins,
// so do it after a minute as to not impact startup performance. Note that
@@ -237,11 +241,11 @@
}
void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
- std::vector<PluginGroup> groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
+ std::vector<webkit::npapi::PluginGroup> groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, &groups);
BrowserThread::PostTask(
BrowserThread::UI,
@@ -253,8 +257,8 @@
void PluginUpdater::OnUpdatePreferences(
Profile* profile,
- const std::vector<WebPluginInfo>& plugins,
- const std::vector<PluginGroup>& groups) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins,
+ const std::vector<webkit::npapi::PluginGroup>& groups) {
ListValue* plugins_list = profile->GetPrefs()->GetMutableList(
prefs::kPluginsPluginsList);
plugins_list->Clear();
@@ -265,7 +269,8 @@
internal_dir);
// Add the plugin files.
- for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
+ plugins.begin();
it != plugins.end();
++it) {
plugins_list->Append(CreatePluginFileSummary(*it));
« no previous file with comments | « chrome/browser/plugin_updater.h ('k') | chrome/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698