summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_view_host.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-31 22:31:04 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-31 22:31:04 +0000
commit9ee73628f9d8ec2998b6060805dac0efd825af44 (patch)
tree39b1016beca729c2295d8cc937bfd654040f83de /chrome/browser/renderer_host/render_view_host.cc
parent30f9ac3cd37f6a4833be4ce0aefa969dea9a1808 (diff)
downloadchromium_src-9ee73628f9d8ec2998b6060805dac0efd825af44.zip
chromium_src-9ee73628f9d8ec2998b6060805dac0efd825af44.tar.gz
chromium_src-9ee73628f9d8ec2998b6060805dac0efd825af44.tar.bz2
Hooking the UI part to the translate feature.
Review URL: http://codereview.chromium.org/549217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.cc')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc12
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);
+}