Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1508)

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 6336012: Get rid of RenderViewHostDelegate::BrowserIntegration since it was unnecessar... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose) 754 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose)
755 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) 755 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove)
756 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading) 756 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading)
757 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading) 757 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading)
758 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, 758 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress,
759 OnMsgDidChangeLoadProgress) 759 OnMsgDidChangeLoadProgress)
760 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, 760 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
761 OnMsgDocumentAvailableInMainFrame) 761 OnMsgDocumentAvailableInMainFrame)
762 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, 762 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
763 OnMsgDocumentOnLoadCompletedInMainFrame) 763 OnMsgDocumentOnLoadCompletedInMainFrame)
764 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply)
765 IPC_MESSAGE_HANDLER(ViewMsg_ExecuteCodeFinished, 764 IPC_MESSAGE_HANDLER(ViewMsg_ExecuteCodeFinished,
766 OnExecuteCodeFinished) 765 OnExecuteCodeFinished)
767 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL) 766 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL)
768 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadFavIcon, OnMsgDidDownloadFavIcon) 767 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadFavIcon, OnMsgDidDownloadFavIcon)
769 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) 768 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu)
770 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) 769 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
771 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 770 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
772 OnMsgDidContentsPreferredSizeChange) 771 OnMsgDidContentsPreferredSizeChange)
773 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, 772 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
774 OnMsgDomOperationResponse) 773 OnMsgDomOperationResponse)
775 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, OnMsgDOMUISend) 774 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, OnMsgDOMUISend)
776 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, 775 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost,
777 OnMsgForwardMessageToExternalHost) 776 OnMsgForwardMessageToExternalHost)
778 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnMsgGoToEntryAtOffset)
779 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) 777 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText)
780 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnMsgRunFileChooser) 778 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnMsgRunFileChooser)
781 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, 779 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage,
782 OnMsgRunJavaScriptMessage) 780 OnMsgRunJavaScriptMessage)
783 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, 781 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm,
784 OnMsgRunBeforeUnloadConfirm) 782 OnMsgRunBeforeUnloadConfirm)
785 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, 783 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog,
786 OnMsgShowModalHTMLDialog) 784 OnMsgShowModalHTMLDialog)
787 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging) 785 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging)
788 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor) 786 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor)
(...skipping 10 matching lines...) Expand all
799 IPC_MESSAGE_HANDLER(ViewHostMsg_ActivateDevToolsWindow, 797 IPC_MESSAGE_HANDLER(ViewHostMsg_ActivateDevToolsWindow,
800 OnActivateDevToolsWindow) 798 OnActivateDevToolsWindow)
801 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseDevToolsWindow, 799 IPC_MESSAGE_HANDLER(ViewHostMsg_CloseDevToolsWindow,
802 OnCloseDevToolsWindow) 800 OnCloseDevToolsWindow)
803 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestDockDevToolsWindow, 801 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestDockDevToolsWindow,
804 OnRequestDockDevToolsWindow) 802 OnRequestDockDevToolsWindow)
805 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestUndockDevToolsWindow, 803 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestUndockDevToolsWindow,
806 OnRequestUndockDevToolsWindow) 804 OnRequestUndockDevToolsWindow)
807 IPC_MESSAGE_HANDLER(ViewHostMsg_DevToolsRuntimePropertyChanged, 805 IPC_MESSAGE_HANDLER(ViewHostMsg_DevToolsRuntimePropertyChanged,
808 OnDevToolsRuntimePropertyChanged) 806 OnDevToolsRuntimePropertyChanged)
809 IPC_MESSAGE_HANDLER(ViewHostMsg_MissingPluginStatus, OnMissingPluginStatus)
810 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
811 IPC_MESSAGE_HANDLER(ViewHostMsg_BlockedOutdatedPlugin,
812 OnBlockedOutdatedPlugin)
813 IPC_MESSAGE_HANDLER(ViewHostMsg_SendCurrentPageAllSavableResourceLinks, 807 IPC_MESSAGE_HANDLER(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
814 OnReceivedSavableResourceLinksForCurrentPage) 808 OnReceivedSavableResourceLinksForCurrentPage)
815 IPC_MESSAGE_HANDLER(ViewHostMsg_SendSerializedHtmlData, 809 IPC_MESSAGE_HANDLER(ViewHostMsg_SendSerializedHtmlData,
816 OnReceivedSerializedHtmlData) 810 OnReceivedSerializedHtmlData)
817 IPC_MESSAGE_HANDLER(ViewHostMsg_DidGetApplicationInfo,
818 OnDidGetApplicationInfo)
819 IPC_MESSAGE_HANDLER(ViewHostMsg_InstallApplication,
820 OnInstallApplication)
821 IPC_MESSAGE_FORWARD(ViewHostMsg_JSOutOfMemory, delegate_, 811 IPC_MESSAGE_FORWARD(ViewHostMsg_JSOutOfMemory, delegate_,
822 RenderViewHostDelegate::OnJSOutOfMemory) 812 RenderViewHostDelegate::OnJSOutOfMemory)
823 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK) 813 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK)
824 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDesktopNotification, 814 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDesktopNotification,
825 OnShowDesktopNotification) 815 OnShowDesktopNotification)
826 IPC_MESSAGE_HANDLER(ViewHostMsg_CancelDesktopNotification, 816 IPC_MESSAGE_HANDLER(ViewHostMsg_CancelDesktopNotification,
827 OnCancelDesktopNotification) 817 OnCancelDesktopNotification)
828 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestNotificationPermission, 818 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestNotificationPermission,
829 OnRequestNotificationPermission) 819 OnRequestNotificationPermission)
830 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRequest, OnExtensionRequest) 820 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRequest, OnExtensionRequest)
831 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged) 821 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged)
832 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage, 822 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionPostMessage,
833 OnExtensionPostMessage) 823 OnExtensionPostMessage)
834 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, 824 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications,
835 OnAccessibilityNotifications) 825 OnAccessibilityNotifications)
836 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted) 826 IPC_MESSAGE_HANDLER(ViewHostMsg_OnCSSInserted, OnCSSInserted)
837 IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents)
838 IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated)
839 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) 827 IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked)
840 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 828 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
841 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed) 829 IPC_MESSAGE_HANDLER(ViewHostMsg_WebDatabaseAccessed, OnWebDatabaseAccessed)
842 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) 830 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged)
843 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 831 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
844 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSuggestions, OnSetSuggestions)
845 IPC_MESSAGE_HANDLER(ViewHostMsg_InstantSupportDetermined,
846 OnInstantSupportDetermined)
847 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite, 832 IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite,
848 OnDetectedPhishingSite) 833 OnDetectedPhishingSite)
849 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) 834 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
850 #if defined(OS_MACOSX) 835 #if defined(OS_MACOSX)
851 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) 836 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
852 #endif 837 #endif
853 IPC_MESSAGE_HANDLER(ViewHostMsg_PagesReadyForPreview, 838 IPC_MESSAGE_HANDLER(ViewHostMsg_PagesReadyForPreview,
854 OnPagesReadyForPreview) 839 OnPagesReadyForPreview)
855 // Have the super handle all other messages. 840 // Have the super handle all other messages.
856 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) 841 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg))
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 } 1088 }
1104 1089
1105 void RenderViewHost::OnMsgDocumentAvailableInMainFrame() { 1090 void RenderViewHost::OnMsgDocumentAvailableInMainFrame() {
1106 delegate_->DocumentAvailableInMainFrame(this); 1091 delegate_->DocumentAvailableInMainFrame(this);
1107 } 1092 }
1108 1093
1109 void RenderViewHost::OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id) { 1094 void RenderViewHost::OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id) {
1110 delegate_->DocumentOnLoadCompletedInMainFrame(this, page_id); 1095 delegate_->DocumentOnLoadCompletedInMainFrame(this, page_id);
1111 } 1096 }
1112 1097
1113 void RenderViewHost::OnMsgFindReply(int request_id,
1114 int number_of_matches,
1115 const gfx::Rect& selection_rect,
1116 int active_match_ordinal,
1117 bool final_update) {
1118 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1119 delegate_->GetBrowserIntegrationDelegate();
1120 if (integration_delegate) {
1121 integration_delegate->OnFindReply(request_id, number_of_matches,
1122 selection_rect,
1123 active_match_ordinal, final_update);
1124 }
1125
1126 // Send a notification to the renderer that we are ready to receive more
1127 // results from the scoping effort of the Find operation. The FindInPage
1128 // scoping is asynchronous and periodically sends results back up to the
1129 // browser using IPC. In an effort to not spam the browser we have the
1130 // browser send an ACK for each FindReply message and have the renderer
1131 // queue up the latest status message while waiting for this ACK.
1132 Send(new ViewMsg_FindReplyACK(routing_id()));
1133 }
1134
1135 void RenderViewHost::OnExecuteCodeFinished(int request_id, bool success) { 1098 void RenderViewHost::OnExecuteCodeFinished(int request_id, bool success) {
1136 std::pair<int, bool> result_details(request_id, success); 1099 std::pair<int, bool> result_details(request_id, success);
1137 NotificationService::current()->Notify( 1100 NotificationService::current()->Notify(
1138 NotificationType::TAB_CODE_EXECUTED, 1101 NotificationType::TAB_CODE_EXECUTED,
1139 NotificationService::AllSources(), 1102 NotificationService::AllSources(),
1140 Details<std::pair<int, bool> >(&result_details)); 1103 Details<std::pair<int, bool> >(&result_details));
1141 } 1104 }
1142 1105
1143 void RenderViewHost::OnMsgUpdateFavIconURL(int32 page_id, 1106 void RenderViewHost::OnMsgUpdateFavIconURL(int32 page_id,
1144 const GURL& icon_url) { 1107 const GURL& icon_url) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 } 1213 }
1251 1214
1252 void RenderViewHost::DisassociateFromPopupCount() { 1215 void RenderViewHost::DisassociateFromPopupCount() {
1253 Send(new ViewMsg_DisassociateFromPopupCount(routing_id())); 1216 Send(new ViewMsg_DisassociateFromPopupCount(routing_id()));
1254 } 1217 }
1255 1218
1256 void RenderViewHost::AllowScriptToClose(bool script_can_close) { 1219 void RenderViewHost::AllowScriptToClose(bool script_can_close) {
1257 Send(new ViewMsg_AllowScriptToClose(routing_id(), script_can_close)); 1220 Send(new ViewMsg_AllowScriptToClose(routing_id(), script_can_close));
1258 } 1221 }
1259 1222
1260 void RenderViewHost::OnMsgGoToEntryAtOffset(int offset) {
1261 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1262 delegate_->GetBrowserIntegrationDelegate();
1263 if (integration_delegate)
1264 integration_delegate->GoToEntryAtOffset(offset);
1265 }
1266
1267 void RenderViewHost::OnMsgSetTooltipText( 1223 void RenderViewHost::OnMsgSetTooltipText(
1268 const std::wstring& tooltip_text, 1224 const std::wstring& tooltip_text,
1269 WebTextDirection text_direction_hint) { 1225 WebTextDirection text_direction_hint) {
1270 // First, add directionality marks around tooltip text if necessary. 1226 // First, add directionality marks around tooltip text if necessary.
1271 // A naive solution would be to simply always wrap the text. However, on 1227 // A naive solution would be to simply always wrap the text. However, on
1272 // windows, Unicode directional embedding characters can't be displayed on 1228 // windows, Unicode directional embedding characters can't be displayed on
1273 // systems that lack RTL fonts and are instead displayed as empty squares. 1229 // systems that lack RTL fonts and are instead displayed as empty squares.
1274 // 1230 //
1275 // To get around this we only wrap the string when we deem it necessary i.e. 1231 // To get around this we only wrap the string when we deem it necessary i.e.
1276 // when the locale direction is different than the tooltip direction hint. 1232 // when the locale direction is different than the tooltip direction hint.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 } 1402 }
1447 1403
1448 void RenderViewHost::UnhandledKeyboardEvent( 1404 void RenderViewHost::UnhandledKeyboardEvent(
1449 const NativeWebKeyboardEvent& event) { 1405 const NativeWebKeyboardEvent& event) {
1450 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1406 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1451 if (view) 1407 if (view)
1452 view->HandleKeyboardEvent(event); 1408 view->HandleKeyboardEvent(event);
1453 } 1409 }
1454 1410
1455 void RenderViewHost::OnUserGesture() { 1411 void RenderViewHost::OnUserGesture() {
1456 RenderViewHostDelegate::BrowserIntegration* integration_delegate = 1412 delegate_->OnUserGesture();
1457 delegate_->GetBrowserIntegrationDelegate();
1458 if (integration_delegate)
1459 integration_delegate->OnUserGesture();
1460 }
1461
1462 void RenderViewHost::OnMissingPluginStatus(int status) {
1463 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1464 delegate_->GetBrowserIntegrationDelegate();
1465 if (integration_delegate)
1466 integration_delegate->OnMissingPluginStatus(status);
1467 }
1468
1469 void RenderViewHost::OnCrashedPlugin(const FilePath& plugin_path) {
1470 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1471 delegate_->GetBrowserIntegrationDelegate();
1472 if (integration_delegate)
1473 integration_delegate->OnCrashedPlugin(plugin_path);
1474 }
1475
1476 void RenderViewHost::OnBlockedOutdatedPlugin(const string16& name,
1477 const GURL& update_url) {
1478 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1479 delegate_->GetBrowserIntegrationDelegate();
1480 if (integration_delegate)
1481 integration_delegate->OnBlockedOutdatedPlugin(name, update_url);
1482 } 1413 }
1483 1414
1484 void RenderViewHost::GetAllSavableResourceLinksForCurrentPage( 1415 void RenderViewHost::GetAllSavableResourceLinksForCurrentPage(
1485 const GURL& page_url) { 1416 const GURL& page_url) {
1486 Send(new ViewMsg_GetAllSavableResourceLinksForCurrentPage(routing_id(), 1417 Send(new ViewMsg_GetAllSavableResourceLinksForCurrentPage(routing_id(),
1487 page_url)); 1418 page_url));
1488 } 1419 }
1489 1420
1490 void RenderViewHost::OnReceivedSavableResourceLinksForCurrentPage( 1421 void RenderViewHost::OnReceivedSavableResourceLinksForCurrentPage(
1491 const std::vector<GURL>& resources_list, 1422 const std::vector<GURL>& resources_list,
1492 const std::vector<GURL>& referrers_list, 1423 const std::vector<GURL>& referrers_list,
1493 const std::vector<GURL>& frames_list) { 1424 const std::vector<GURL>& frames_list) {
1494 RenderViewHostDelegate::Save* save_delegate = delegate_->GetSaveDelegate(); 1425 RenderViewHostDelegate::Save* save_delegate = delegate_->GetSaveDelegate();
1495 if (save_delegate) { 1426 if (save_delegate) {
1496 save_delegate->OnReceivedSavableResourceLinksForCurrentPage( 1427 save_delegate->OnReceivedSavableResourceLinksForCurrentPage(
1497 resources_list, referrers_list, frames_list); 1428 resources_list, referrers_list, frames_list);
1498 } 1429 }
1499 } 1430 }
1500 1431
1501 void RenderViewHost::OnDidGetApplicationInfo(
1502 int32 page_id, const WebApplicationInfo& info) {
1503 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1504 delegate_->GetBrowserIntegrationDelegate();
1505 if (integration_delegate)
1506 integration_delegate->OnDidGetApplicationInfo(page_id, info);
1507 }
1508
1509 void RenderViewHost::OnInstallApplication(
1510 const WebApplicationInfo& info) {
1511 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1512 delegate_->GetBrowserIntegrationDelegate();
1513 if (integration_delegate)
1514 integration_delegate->OnInstallApplication(info);
1515 }
1516
1517 void RenderViewHost::GetSerializedHtmlDataForCurrentPageWithLocalLinks( 1432 void RenderViewHost::GetSerializedHtmlDataForCurrentPageWithLocalLinks(
1518 const std::vector<GURL>& links, 1433 const std::vector<GURL>& links,
1519 const std::vector<FilePath>& local_paths, 1434 const std::vector<FilePath>& local_paths,
1520 const FilePath& local_directory_name) { 1435 const FilePath& local_directory_name) {
1521 Send(new ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks( 1436 Send(new ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks(
1522 routing_id(), links, local_paths, local_directory_name)); 1437 routing_id(), links, local_paths, local_directory_name));
1523 } 1438 }
1524 1439
1525 void RenderViewHost::OnReceivedSerializedHtmlData(const GURL& frame_url, 1440 void RenderViewHost::OnReceivedSerializedHtmlData(const GURL& frame_url,
1526 const std::string& data, 1441 const std::string& data,
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 NotificationService::NoDetails()); 1737 NotificationService::NoDetails());
1823 } 1738 }
1824 1739
1825 AccessibilityNotificationsAck(); 1740 AccessibilityNotificationsAck();
1826 } 1741 }
1827 1742
1828 void RenderViewHost::OnCSSInserted() { 1743 void RenderViewHost::OnCSSInserted() {
1829 delegate_->DidInsertCSS(); 1744 delegate_->DidInsertCSS();
1830 } 1745 }
1831 1746
1832 void RenderViewHost::OnPageContents(const GURL& url,
1833 int32 page_id,
1834 const string16& contents,
1835 const std::string& language,
1836 bool page_translatable) {
1837 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1838 delegate_->GetBrowserIntegrationDelegate();
1839 if (!integration_delegate)
1840 return;
1841 integration_delegate->OnPageContents(url, process()->id(), page_id, contents,
1842 language, page_translatable);
1843 }
1844
1845 void RenderViewHost::OnPageTranslated(int32 page_id,
1846 const std::string& original_lang,
1847 const std::string& translated_lang,
1848 TranslateErrors::Type error_type) {
1849 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1850 delegate_->GetBrowserIntegrationDelegate();
1851 if (!integration_delegate)
1852 return;
1853 integration_delegate->OnPageTranslated(page_id, original_lang,
1854 translated_lang, error_type);
1855 }
1856
1857 void RenderViewHost::OnContentBlocked(ContentSettingsType type, 1747 void RenderViewHost::OnContentBlocked(ContentSettingsType type,
1858 const std::string& resource_identifier) { 1748 const std::string& resource_identifier) {
1859 RenderViewHostDelegate::ContentSettings* content_settings_delegate = 1749 RenderViewHostDelegate::ContentSettings* content_settings_delegate =
1860 delegate_->GetContentSettingsDelegate(); 1750 delegate_->GetContentSettingsDelegate();
1861 if (content_settings_delegate) 1751 if (content_settings_delegate)
1862 content_settings_delegate->OnContentBlocked(type, resource_identifier); 1752 content_settings_delegate->OnContentBlocked(type, resource_identifier);
1863 } 1753 }
1864 1754
1865 void RenderViewHost::OnAppCacheAccessed(const GURL& manifest_url, 1755 void RenderViewHost::OnAppCacheAccessed(const GURL& manifest_url,
1866 bool blocked_by_policy) { 1756 bool blocked_by_policy) {
(...skipping 15 matching lines...) Expand all
1882 content_settings_delegate->OnWebDatabaseAccessed( 1772 content_settings_delegate->OnWebDatabaseAccessed(
1883 url, name, display_name, estimated_size, blocked_by_policy); 1773 url, name, display_name, estimated_size, blocked_by_policy);
1884 } 1774 }
1885 1775
1886 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent, 1776 void RenderViewHost::OnUpdateZoomLimits(int minimum_percent,
1887 int maximum_percent, 1777 int maximum_percent,
1888 bool remember) { 1778 bool remember) {
1889 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember); 1779 delegate_->UpdateZoomLimits(minimum_percent, maximum_percent, remember);
1890 } 1780 }
1891 1781
1892 void RenderViewHost::OnSetSuggestions(
1893 int32 page_id,
1894 const std::vector<std::string>& suggestions) {
1895 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1896 delegate_->GetBrowserIntegrationDelegate();
1897 if (!integration_delegate)
1898 return;
1899 integration_delegate->OnSetSuggestions(page_id, suggestions);
1900 }
1901
1902 void RenderViewHost::OnInstantSupportDetermined(int32 page_id, bool result) {
1903 RenderViewHostDelegate::BrowserIntegration* integration_delegate =
1904 delegate_->GetBrowserIntegrationDelegate();
1905 if (!integration_delegate)
1906 return;
1907 integration_delegate->OnInstantSupportDetermined(page_id, result);
1908 }
1909
1910 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url, 1782 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url,
1911 double phishing_score) { 1783 double phishing_score) {
1912 // TODO(noelutz): send an HTTP request to the client-side detection frontends 1784 // TODO(noelutz): send an HTTP request to the client-side detection frontends
1913 // to confirm that the URL is really phishing. 1785 // to confirm that the URL is really phishing.
1914 } 1786 }
1915 1787
1916 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { 1788 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) {
1917 Value* result_value; 1789 Value* result_value;
1918 result.Get(0, &result_value); 1790 result.Get(0, &result_value);
1919 std::pair<int, Value*> details(id, result_value); 1791 std::pair<int, Value*> details(id, result_value);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 if (printer_query.get()) { 1851 if (printer_query.get()) {
1980 BrowserThread::PostTask( 1852 BrowserThread::PostTask(
1981 BrowserThread::IO, FROM_HERE, 1853 BrowserThread::IO, FROM_HERE,
1982 NewRunnableMethod(printer_query.get(), 1854 NewRunnableMethod(printer_query.get(),
1983 &printing::PrinterQuery::StopWorker)); 1855 &printing::PrinterQuery::StopWorker));
1984 } 1856 }
1985 1857
1986 // Send the printingDone msg for now. 1858 // Send the printingDone msg for now.
1987 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); 1859 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true));
1988 } 1860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698