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

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/renderer_host/resource_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/resource_message_filter.cc (revision 30650)
+++ chrome/browser/renderer_host/resource_message_filter.cc (working copy)
@@ -234,8 +234,7 @@
// this object for sending messages.
audio_renderer_host_->IPCChannelConnected(id(), handle(), this);
- WorkerService::GetInstance()->Initialize(
- resource_dispatcher_host_, ui_loop());
+ WorkerService::GetInstance()->Initialize(resource_dispatcher_host_);
appcache_dispatcher_host_->Initialize(this, id(), handle());
socket_stream_dispatcher_host_->Initialize(this, id());
dom_storage_dispatcher_host_->Init(handle());
@@ -430,8 +429,9 @@
// Create a new ViewHostMsg_ContextMenu message.
const ViewHostMsg_ContextMenu context_menu_message(msg.routing_id(), params);
- ui_loop()->PostTask(FROM_HERE, new ContextMenuMessageDispatcher(
- id(), context_menu_message));
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ new ContextMenuMessageDispatcher(id(), context_menu_message));
}
// Called on the IPC thread:
@@ -456,10 +456,6 @@
return request_context->GetURLRequestContext();
}
-MessageLoop* ResourceMessageFilter::ui_loop() {
- return render_widget_helper_->ui_loop();
-}
-
void ResourceMessageFilter::OnMsgCreateWindow(
int opener_id, bool user_gesture, int* route_id) {
render_widget_helper_->CreateNewWindow(opener_id,
@@ -704,7 +700,8 @@
Clipboard::DuplicateRemoteHandles(handle(), long_living_objects);
#endif
- ui_loop()->PostTask(FROM_HERE, new WriteClipboardTask(long_living_objects));
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE, new WriteClipboardTask(long_living_objects));
}
#if !defined(OS_LINUX)
@@ -823,8 +820,9 @@
static_cast<int>(stats.fonts.size / 1024));
// We need to notify the TaskManager of these statistics from the UI
// thread.
- ui_loop()->PostTask(
- FROM_HERE, NewRunnableFunction(
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ NewRunnableFunction(
&ResourceMessageFilter::OnResourceTypeStatsOnUIThread,
stats,
base::GetProcId(handle())));
@@ -1170,7 +1168,8 @@
#if defined(USE_TCMALLOC)
void ResourceMessageFilter::OnRendererTcmalloc(base::ProcessId pid,
const std::string& output) {
- ui_loop()->PostTask(FROM_HERE,
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
NewRunnableFunction(AboutTcmallocRendererCallback, pid, output));
}
#endif
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/browser/renderer_host/resource_message_filter_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698