Index: chrome/browser/renderer_host/chrome_render_message_filter.cc |
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc |
index d7393aa909bcc8e4eef5a1bca65c4a0590fefa39..15852e27a37a29b516bda6c23681382e5a5eb76d 100644 |
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc |
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc |
@@ -10,6 +10,7 @@ |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/content_settings/host_content_settings_map.h" |
#include "chrome/browser/content_settings/tab_specific_content_settings.h" |
+#include "chrome/browser/download/mhtml_generation_manager.h" |
#include "chrome/browser/extensions/extension_event_router.h" |
#include "chrome/browser/extensions/extension_function_dispatcher.h" |
#include "chrome/browser/extensions/extension_message_service.h" |
@@ -98,6 +99,7 @@ bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message, |
IPC_MESSAGE_HANDLER(ViewHostMsg_CanTriggerClipboardWrite, |
OnCanTriggerClipboardWrite) |
IPC_MESSAGE_HANDLER(ViewHostMsg_ClearPredictorCache, OnClearPredictorCache) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -137,10 +139,10 @@ void ChromeRenderMessageFilter::OverrideThreadForMessage( |
case ExtensionHostMsg_AddListener::ID: |
case ExtensionHostMsg_RemoveListener::ID: |
case ExtensionHostMsg_CloseChannel::ID: |
- *thread = BrowserThread::UI; |
- break; |
case ViewHostMsg_UpdatedCacheStats::ID: |
+ case ViewHostMsg_SavedPageAsMHTML::ID: |
*thread = BrowserThread::UI; |
+ break; |
default: |
break; |
} |
@@ -500,3 +502,10 @@ void ChromeRenderMessageFilter::OnSetCookie(const IPC::Message& message, |
AutomationResourceMessageFilter::SetCookiesForUrl( |
render_process_id_, message.routing_id(), url, cookie); |
} |
+ |
+ |
+void ChromeRenderMessageFilter::OnSavedPageAsMHTML(int job_id, bool success) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ g_browser_process->mhtml_generation_manager()-> |
+ MHTMLGenerated(job_id, success); |
+} |