diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 05:55:10 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 05:55:10 +0000 |
commit | ab820df141e6ab45fd8a095d2f57f91df44e6c9c (patch) | |
tree | 20ae83601c4a484cd74c908b62bc9d702ef27996 /chrome/renderer | |
parent | 4d9bdfafcd1393385860bc9fe947e0c07719c0f4 (diff) | |
download | chromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.zip chromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.tar.gz chromium_src-ab820df141e6ab45fd8a095d2f57f91df44e6c9c.tar.bz2 |
Chrome changes corresponding to my message_loop_type CL.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_thread.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_thread.h | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_main.cc | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 6b34176..fb70dd4 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -37,7 +37,13 @@ RenderThread::RenderThread(const std::wstring& channel_name) render_dns_master_(NULL), in_send_(0) { DCHECK(owner_loop_); - StartWithStackSize(kStackSize); + base::Thread::Options options; + options.stack_size = kStackSize; + // When we run plugins in process, we actually run them on the render thread, + // which means that we need to make the render thread pump UI events. + if (RenderProcess::ShouldLoadPluginsInProcess()) + options.message_loop_type = MessageLoop::TYPE_UI; + StartWithOptions(options); } RenderThread::~RenderThread() { diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index 6a7d019..89b203f 100644 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -32,7 +32,7 @@ class NotificationService; class RenderThread : public IPC::Channel::Listener, public IPC::Message::Sender, - public Thread { + public base::Thread { public: RenderThread(const std::wstring& channel_name); ~RenderThread(); diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 59c4003..7a3e898 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -43,11 +43,12 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) { // mainline routine for running as the Rendererer process int RendererMain(CommandLine &parsed_command_line, int show_command, - sandbox::TargetServices* target_services) -{ + sandbox::TargetServices* target_services) { StatsScope<StatsCounterTimer> startup_timer(chrome::Counters::renderer_main()); + // The main thread of the renderer services IO. + MessageLoopForIO main_message_loop; PlatformThread::SetName("Chrome_RendererMain"); CoInitialize(NULL); |