diff options
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index cb0eddf..820b575 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -825,6 +825,7 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { OnAccessibilityFocusChange) IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) + IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) // Have the super handle all other messages. IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) IPC_END_MESSAGE_MAP_EX() @@ -1794,3 +1795,14 @@ void RenderViewHost::OnPageContents(const GURL& url, integration_delegate->OnPageContents(url, process()->id(), page_id, contents, language); } + +void RenderViewHost::OnPageTranslated(int32 page_id, + const std::string& original_lang, + const std::string& translated_lang) { + RenderViewHostDelegate::BrowserIntegration* integration_delegate = + delegate_->GetBrowserIntegrationDelegate(); + if (!integration_delegate) + return; + integration_delegate->OnPageTranslated(page_id, + original_lang, translated_lang); +} |