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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 14304004: Convert a bunch of test_shell_tests to content_browsertests. These are tests that depend on loading… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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/renderer_host/render_process_host_impl.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_process_host_impl.cc (revision 195684)
+++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
@@ -144,6 +144,8 @@
namespace content {
namespace {
+base::MessageLoop* g_in_process_thread;
+
void CacheShaderInfo(int32 id, base::FilePath path) {
ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
}
@@ -171,9 +173,11 @@
virtual void Init() OVERRIDE {
render_process_.reset(new RenderProcessImpl());
new RenderThreadImpl(channel_id_);
+ g_in_process_thread = message_loop();
}
virtual void CleanUp() OVERRIDE {
+ g_in_process_thread = NULL;
render_process_.reset();
// It's a little lame to manually set this flag. But the single process
@@ -497,11 +501,11 @@
in_process_renderer_.reset(new RendererMainThread(channel_id));
base::Thread::Options options;
-#if !defined(TOOLKIT_GTK) && !defined(OS_ANDROID)
+#if defined(OS_WIN) && !defined(OS_MACOSX)
// In-process plugins require this to be a UI message loop.
options.message_loop_type = MessageLoop::TYPE_UI;
#else
- // We can't have multiple UI loops on GTK and Android, so we don't support
+ // We can't have multiple UI loops on Linux and Android, so we don't support
// in-process plugins.
options.message_loop_type = MessageLoop::TYPE_DEFAULT;
#endif
@@ -1539,6 +1543,11 @@
map->RegisterProcess(site, process);
}
+base::MessageLoop*
+ RenderProcessHostImpl::GetInProcessRendererThreadForTesting() {
+ return g_in_process_thread;
+}
+
void RenderProcessHostImpl::ProcessDied(bool already_dead) {
// Our child process has died. If we didn't expect it, it's a crash.
// In any case, we need to let everyone know it's gone.
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698