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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 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/browser/plugin_process_host_mac.cc ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_service_impl.cc
===================================================================
--- content/browser/plugin_service_impl.cc (revision 118420)
+++ content/browser/plugin_service_impl.cc (working copy)
@@ -82,12 +82,8 @@
static void NotifyPluginsOfActivation() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- for (BrowserChildProcessHost::Iterator iter(
- content::PROCESS_TYPE_PLUGIN);
- !iter.Done(); ++iter) {
- PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter);
- plugin->OnAppActivation();
- }
+ for (PluginProcessHostIterator iter; !iter.Done(); ++iter)
+ iter->OnAppActivation();
}
#endif
#if defined(OS_POSIX) && !defined(OS_OPENBSD)
@@ -231,13 +227,9 @@
PluginProcessHost* PluginServiceImpl::FindNpapiPluginProcess(
const FilePath& plugin_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
- for (BrowserChildProcessHost::Iterator iter(content::PROCESS_TYPE_PLUGIN);
- !iter.Done(); ++iter) {
- PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter);
- if (plugin->info().path == plugin_path)
- return plugin;
+ for (PluginProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter->info().path == plugin_path)
+ return *iter;
}
return NULL;
@@ -245,15 +237,9 @@
PpapiPluginProcessHost* PluginServiceImpl::FindPpapiPluginProcess(
const FilePath& plugin_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
- for (BrowserChildProcessHost::Iterator iter(
- content::PROCESS_TYPE_PPAPI_PLUGIN);
- !iter.Done(); ++iter) {
- PpapiPluginProcessHost* plugin =
- static_cast<PpapiPluginProcessHost*>(*iter);
- if (plugin->plugin_path() == plugin_path)
- return plugin;
+ for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter->plugin_path() == plugin_path)
+ return *iter;
}
return NULL;
@@ -261,15 +247,9 @@
PpapiPluginProcessHost* PluginServiceImpl::FindPpapiBrokerProcess(
const FilePath& broker_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
- for (BrowserChildProcessHost::Iterator iter(
- content::PROCESS_TYPE_PPAPI_BROKER);
- !iter.Done(); ++iter) {
- PpapiPluginProcessHost* broker =
- static_cast<PpapiPluginProcessHost*>(*iter);
- if (broker->plugin_path() == broker_path)
- return broker;
+ for (PpapiBrokerProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter->plugin_path() == broker_path)
+ return *iter;
}
return NULL;
« no previous file with comments | « content/browser/plugin_process_host_mac.cc ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698