Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index f22ba7f05bc2469e0b834aa6857fdbd61d6d70ea..7baf0a7a57e7de3f05cc18765df158a70ea74114 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -47,7 +47,6 @@ |
#include "content/browser/device_orientation/message_filter.h" |
#include "content/browser/dom_storage/dom_storage_context_impl.h" |
#include "content/browser/dom_storage/dom_storage_message_filter.h" |
-#include "content/browser/download/mhtml_generation_manager.h" |
#include "content/browser/fileapi/chrome_blob_storage_context.h" |
#include "content/browser/fileapi/fileapi_message_filter.h" |
#include "content/browser/geolocation/geolocation_dispatcher_host.h" |
@@ -67,6 +66,7 @@ |
#include "content/browser/renderer_host/media/audio_renderer_host.h" |
#include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
#include "content/browser/renderer_host/media/video_capture_host.h" |
+#include "content/browser/renderer_host/mhtml_generation_message_filter.h" |
#include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
#include "content/browser/renderer_host/pepper_file_message_filter.h" |
#include "content/browser/renderer_host/pepper_message_filter.h" |
@@ -543,6 +543,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
channel_->AddFilter(new content::GamepadBrowserMessageFilter(this)); |
channel_->AddFilter(new content::ProfilerMessageFilter( |
content::PROCESS_TYPE_RENDERER)); |
+ channel_->AddFilter(new content::MHTMLGenerationMessageFilter()); |
} |
int RenderProcessHostImpl::GetNextRoutingID() { |
@@ -901,8 +902,8 @@ bool RenderProcessHostImpl::OnMessageReceived(const IPC::Message& msg) { |
SuddenTerminationChanged) |
IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, |
OnUserMetricsRecordAction) |
- IPC_MESSAGE_HANDLER(ViewHostMsg_RevealFolderInOS, OnRevealFolderInOS) |
- IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) |
+ // Do not add more handlers here for your service! Rather, create a |
+ // message filter and add it in CreateMessageFilters(). |
jam
2012/05/02 18:15:00
I agree if there are a few messages for a feature.
|
IPC_MESSAGE_UNHANDLED_ERROR() |
IPC_END_MESSAGE_MAP_EX() |
@@ -1342,17 +1343,6 @@ void RenderProcessHostImpl::OnUserMetricsRecordAction( |
content::RecordComputedAction(action); |
} |
-void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
- // Only honor the request if appropriate persmissions are granted. |
- if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
- path)) |
- content::GetContentClient()->browser()->OpenItem(path); |
-} |
- |
-void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
- MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
-} |
- |
void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost( |
int32 surface_id, |
uint64 surface_handle, |