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

Unified Diff: chrome/app/chrome_main.cc

Issue 6708013: Add separate ContentClient interfaces for gpu/plugin/renderer processes. Since we don't have a n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
===================================================================
--- chrome/app/chrome_main.cc (revision 78583)
+++ chrome/app/chrome_main.cc (working copy)
@@ -26,6 +26,8 @@
#include "chrome/browser/platform_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_content_client.h"
+#include "chrome/common/chrome_content_gpu_client.h"
+#include "chrome/common/chrome_content_plugin_client.h"
#include "chrome/common/chrome_counters.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -211,7 +213,7 @@
#endif
}
-void CommonSubprocessInit() {
+void CommonSubprocessInit(const std::string& process_type) {
#if defined(OS_WIN)
// HACK: Let Windows know that we have started. This is needed to suppress
// the IDC_APPSTARTING cursor from being displayed for a prolonged period
@@ -231,6 +233,14 @@
// surface UI -- but it's likely they get this wrong too so why not.
setlocale(LC_NUMERIC, "C");
#endif
+
+ if (process_type == switches::kPluginProcess) {
+ static chrome::ChromeContentPluginClient chrome_content_plugin_client;
+ content::GetContentClient()->set_plugin(&chrome_content_plugin_client);
+ } else if (process_type == switches::kGpuProcess) {
+ static chrome::ChromeContentGpuClient chrome_content_gpu_client;
+ content::GetContentClient()->set_gpu(&chrome_content_gpu_client);
+ }
}
// Returns true if this subprocess type needs the ResourceBundle initialized
@@ -722,7 +732,7 @@
}
if (!process_type.empty())
- CommonSubprocessInit();
+ CommonSubprocessInit(process_type);
// Initialize the sandbox for this process.
SandboxInitWrapper sandbox_wrapper;
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698