OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) | 855 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) |
856 IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) | 856 IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) |
857 IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) | 857 IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) |
858 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) | 858 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) |
859 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 859 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
860 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) | 860 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) |
861 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityTree, OnAccessibilityTree) | 861 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityTree, OnAccessibilityTree) |
862 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) | 862 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) |
863 IPC_MESSAGE_HANDLER(ViewHostMsg_SetDisplayingPDFContent, | 863 IPC_MESSAGE_HANDLER(ViewHostMsg_SetDisplayingPDFContent, |
864 OnSetDisplayingPDFContent) | 864 OnSetDisplayingPDFContent) |
| 865 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSuggestResult, OnSetSuggestResult) |
865 // Have the super handle all other messages. | 866 // Have the super handle all other messages. |
866 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) | 867 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) |
867 IPC_END_MESSAGE_MAP_EX() | 868 IPC_END_MESSAGE_MAP_EX() |
868 | 869 |
869 if (!msg_is_ok) { | 870 if (!msg_is_ok) { |
870 // The message had a handler, but its de-serialization failed. | 871 // The message had a handler, but its de-serialization failed. |
871 // Kill the renderer. | 872 // Kill the renderer. |
872 process()->ReceivedBadMessage(msg.type()); | 873 process()->ReceivedBadMessage(msg.type()); |
873 } | 874 } |
874 } | 875 } |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 RenderViewHostDelegate::ContentSettings* content_settings_delegate = | 2072 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
2072 delegate_->GetContentSettingsDelegate(); | 2073 delegate_->GetContentSettingsDelegate(); |
2073 if (content_settings_delegate) | 2074 if (content_settings_delegate) |
2074 content_settings_delegate->OnWebDatabaseAccessed( | 2075 content_settings_delegate->OnWebDatabaseAccessed( |
2075 url, name, display_name, estimated_size, blocked_by_policy); | 2076 url, name, display_name, estimated_size, blocked_by_policy); |
2076 } | 2077 } |
2077 | 2078 |
2078 void RenderViewHost::OnSetDisplayingPDFContent() { | 2079 void RenderViewHost::OnSetDisplayingPDFContent() { |
2079 delegate_->SetDisplayingPDFContent(); | 2080 delegate_->SetDisplayingPDFContent(); |
2080 } | 2081 } |
| 2082 |
| 2083 void RenderViewHost::OnSetSuggestResult(int32 page_id, |
| 2084 const std::string& result) { |
| 2085 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
| 2086 delegate_->GetBrowserIntegrationDelegate(); |
| 2087 if (!integration_delegate) |
| 2088 return; |
| 2089 integration_delegate->OnSetSuggestResult(page_id, result); |
| 2090 } |
OLD | NEW |