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

Unified Diff: content/common/pepper_plugin_registry.cc

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 2 months 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 | « content/common/pepper_plugin_registry.h ('k') | content/common/set_process_title.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/pepper_plugin_registry.cc
===================================================================
--- content/common/pepper_plugin_registry.cc (revision 163460)
+++ content/common/pepper_plugin_registry.cc (working copy)
@@ -15,11 +15,11 @@
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "webkit/plugins/npapi/plugin_list.h"
+namespace content {
namespace {
// Appends any plugins from the command line to the given vector.
-void ComputePluginsFromCommandLine(
- std::vector<content::PepperPluginInfo>* plugins) {
+void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
bool out_of_process =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiOutOfProcess);
const std::string value =
@@ -47,7 +47,7 @@
std::vector<std::string> name_parts;
base::SplitString(parts[0], '#', &name_parts);
- content::PepperPluginInfo plugin;
+ PepperPluginInfo plugin;
plugin.is_out_of_process = out_of_process;
#if defined(OS_WIN)
// This means we can't provide plugins from non-ASCII paths, but
@@ -79,7 +79,7 @@
} // namespace
-webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const {
+webkit::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const {
webkit::WebPluginInfo info;
info.type = is_out_of_process ?
@@ -100,7 +100,7 @@
}
bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info,
- content::PepperPluginInfo* pepper_info) {
+ PepperPluginInfo* pepper_info) {
if (!webkit::IsPepperPlugin(webplugin_info))
return false;
@@ -129,15 +129,14 @@
}
// static
-void PepperPluginRegistry::ComputeList(
- std::vector<content::PepperPluginInfo>* plugins) {
- content::GetContentClient()->AddPepperPlugins(plugins);
+void PepperPluginRegistry::ComputeList(std::vector<PepperPluginInfo>* plugins) {
+ GetContentClient()->AddPepperPlugins(plugins);
ComputePluginsFromCommandLine(plugins);
}
// static
void PepperPluginRegistry::PreloadModules() {
- std::vector<content::PepperPluginInfo> plugins;
+ std::vector<PepperPluginInfo> plugins;
ComputeList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
if (!plugins[i].is_internal && plugins[i].is_sandboxed) {
@@ -152,7 +151,7 @@
}
}
-const content::PepperPluginInfo* PepperPluginRegistry::GetInfoForPlugin(
+const PepperPluginInfo* PepperPluginRegistry::GetInfoForPlugin(
const webkit::WebPluginInfo& info) {
for (size_t i = 0; i < plugin_list_.size(); ++i) {
if (info.path == plugin_list_[i].path)
@@ -163,7 +162,7 @@
// is actually in |info| and we can use it to construct it and add it to
// the list. This same deal needs to be done in the browser side in
// PluginService.
- content::PepperPluginInfo plugin;
+ PepperPluginInfo plugin;
if (!MakePepperPluginInfo(info, &plugin))
return NULL;
@@ -219,7 +218,7 @@
// the initialized module, it will still try to unregister itself in its
// destructor.
for (size_t i = 0; i < plugin_list_.size(); i++) {
- const content::PepperPluginInfo& current = plugin_list_[i];
+ const PepperPluginInfo& current = plugin_list_[i];
if (current.is_out_of_process)
continue; // Out of process plugins need no special pre-initialization.
@@ -243,3 +242,4 @@
}
}
+} // namespace content
« no previous file with comments | « content/common/pepper_plugin_registry.h ('k') | content/common/set_process_title.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698