summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_view_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.cc')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 0af786b..842e7b4 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)
@@ -848,7 +854,6 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityFocusChange,
OnAccessibilityFocusChange)
IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted)
- IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg))
IPC_END_MESSAGE_MAP_EX()
@@ -1162,6 +1167,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(
@@ -1782,15 +1795,3 @@ void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) {
void RenderViewHost::OnCSSInserted() {
delegate_->DidInsertCSS();
}
-
-void RenderViewHost::OnPageContents(const GURL& url,
- int32 page_id,
- const std::wstring& contents,
- const std::string& language) {
- RenderViewHostDelegate::BrowserIntegration* integration_delegate =
- delegate_->GetBrowserIntegrationDelegate();
- if (!integration_delegate)
- return;
- integration_delegate->OnPageContents(url, process()->id(), page_id, contents,
- language);
-}