diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 02:32:24 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 02:32:24 +0000 |
commit | bdd7a12d4abc0b6456f679bb077045a0147c3dfc (patch) | |
tree | b660235491e9e7e7b83ca4952243ffc3c44573c0 /chrome/browser/renderer_host/render_view_host.cc | |
parent | 935d561148669a26ece1535343a7be8bef3392ab (diff) | |
download | chromium_src-bdd7a12d4abc0b6456f679bb077045a0147c3dfc.zip chromium_src-bdd7a12d4abc0b6456f679bb077045a0147c3dfc.tar.gz chromium_src-bdd7a12d4abc0b6456f679bb077045a0147c3dfc.tar.bz2 |
Revert 36589 - Still failing the reliability tests.
Another try at landing this.
It caused several tests to fails previously.
There was a crasher in some Windows code in the CLD that has been removed by the port of the CLD code to Linux and Mac.
That should hopefully make everything work now.
Enabling language detection on page load.
A memory error has been fixed in the CLD library in the meantime.
This should hopefully fixes the crashers in the reliability tests.
Note that this version is actually simpler than the original review since the detection is now performed in the renderer. (So the CLD code runs sandboxed.)
Original review:
http://codereview.chromium.org/492024/show
BUG=30662
TEST=Run the unittests.
TBR=brettw
Review URL: http://codereview.chromium.org/552049
TBR=jcampan@chromium.org
Review URL: http://codereview.chromium.org/554015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36603 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.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 3d705cb..d210ffe 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -428,6 +428,10 @@ void RenderViewHost::StopFinding(bool clear_selection) { Send(new ViewMsg_StopFinding(routing_id(), clear_selection)); } +void RenderViewHost::GetPageLanguage() { + Send(new ViewMsg_DeterminePageLanguage(routing_id())); +} + void RenderViewHost::Zoom(PageZoom::Function function) { Send(new ViewMsg_Zoom(routing_id(), function)); } @@ -765,6 +769,8 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, OnMsgDidFailProvisionalLoadWithError) IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply) + IPC_MESSAGE_HANDLER(ViewHostMsg_PageLanguageDetermined, + OnPageLanguageDetermined) IPC_MESSAGE_HANDLER(ViewMsg_ExecuteCodeFinished, OnExecuteCodeFinished) IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL) @@ -1162,6 +1168,14 @@ void RenderViewHost::OnMsgFindReply(int request_id, Send(new ViewMsg_FindReplyACK(routing_id())); } +void RenderViewHost::OnPageLanguageDetermined(const std::string& language) { + std::string lang(language); + NotificationService::current()->Notify( + NotificationType::TAB_LANGUAGE_DETERMINED, + Source<RenderViewHost>(this), + Details<std::string>(&lang)); +} + void RenderViewHost::OnExecuteCodeFinished(int request_id, bool success) { std::pair<int, bool> result_details(request_id, success); NotificationService::current()->Notify( @@ -1800,12 +1814,10 @@ void RenderViewHost::OnCSSInserted() { void RenderViewHost::OnPageContents(const GURL& url, int32 page_id, - const std::wstring& contents, - const std::string& language) { + const std::wstring& contents) { RenderViewHostDelegate::BrowserIntegration* integration_delegate = delegate_->GetBrowserIntegrationDelegate(); if (!integration_delegate) return; - integration_delegate->OnPageContents(url, process()->id(), page_id, contents, - language); + integration_delegate->OnPageContents(url, process()->id(), page_id, contents); } |