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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 796 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
797 OnMsgDidContentsPreferredSizeChange) | 797 OnMsgDidContentsPreferredSizeChange) |
798 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, | 798 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, |
799 OnMsgDomOperationResponse) | 799 OnMsgDomOperationResponse) |
800 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, | 800 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, |
801 OnMsgDOMUISend) | 801 OnMsgDOMUISend) |
802 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, | 802 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, |
803 OnMsgForwardMessageToExternalHost) | 803 OnMsgForwardMessageToExternalHost) |
804 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentLoadedInFrame, | 804 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentLoadedInFrame, |
805 OnMsgDocumentLoadedInFrame) | 805 OnMsgDocumentLoadedInFrame) |
| 806 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFinishLoad, |
| 807 OnMsgDidFinishLoad) |
806 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, | 808 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, |
807 OnMsgGoToEntryAtOffset) | 809 OnMsgGoToEntryAtOffset) |
808 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) | 810 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) |
809 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnMsgRunFileChooser) | 811 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnMsgRunFileChooser) |
810 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 812 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
811 OnMsgRunJavaScriptMessage) | 813 OnMsgRunJavaScriptMessage) |
812 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 814 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
813 OnMsgRunBeforeUnloadConfirm) | 815 OnMsgRunBeforeUnloadConfirm) |
814 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, | 816 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, |
815 OnMsgShowModalHTMLDialog) | 817 OnMsgShowModalHTMLDialog) |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 delegate_->ProcessExternalHostMessage(message, origin, target); | 1366 delegate_->ProcessExternalHostMessage(message, origin, target); |
1365 } | 1367 } |
1366 | 1368 |
1367 void RenderViewHost::OnMsgDocumentLoadedInFrame(long long frame_id) { | 1369 void RenderViewHost::OnMsgDocumentLoadedInFrame(long long frame_id) { |
1368 RenderViewHostDelegate::Resource* resource_delegate = | 1370 RenderViewHostDelegate::Resource* resource_delegate = |
1369 delegate_->GetResourceDelegate(); | 1371 delegate_->GetResourceDelegate(); |
1370 if (resource_delegate) | 1372 if (resource_delegate) |
1371 resource_delegate->DocumentLoadedInFrame(frame_id); | 1373 resource_delegate->DocumentLoadedInFrame(frame_id); |
1372 } | 1374 } |
1373 | 1375 |
| 1376 void RenderViewHost::OnMsgDidFinishLoad(long long frame_id) { |
| 1377 RenderViewHostDelegate::Resource* resource_delegate = |
| 1378 delegate_->GetResourceDelegate(); |
| 1379 if (resource_delegate) |
| 1380 resource_delegate->DidFinishLoad(frame_id); |
| 1381 } |
| 1382 |
1374 void RenderViewHost::DisassociateFromPopupCount() { | 1383 void RenderViewHost::DisassociateFromPopupCount() { |
1375 Send(new ViewMsg_DisassociateFromPopupCount(routing_id())); | 1384 Send(new ViewMsg_DisassociateFromPopupCount(routing_id())); |
1376 } | 1385 } |
1377 | 1386 |
1378 void RenderViewHost::AllowScriptToClose(bool script_can_close) { | 1387 void RenderViewHost::AllowScriptToClose(bool script_can_close) { |
1379 Send(new ViewMsg_AllowScriptToClose(routing_id(), script_can_close)); | 1388 Send(new ViewMsg_AllowScriptToClose(routing_id(), script_can_close)); |
1380 } | 1389 } |
1381 | 1390 |
1382 void RenderViewHost::OnMsgGoToEntryAtOffset(int offset) { | 1391 void RenderViewHost::OnMsgGoToEntryAtOffset(int offset) { |
1383 RenderViewHostDelegate::BrowserIntegration* integration_delegate = | 1392 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 } | 2210 } |
2202 #else | 2211 #else |
2203 void RenderViewHost::OnPagesReadyForPreview(int fd_in_browser) { | 2212 void RenderViewHost::OnPagesReadyForPreview(int fd_in_browser) { |
2204 // TODO(kmadhusu): Function definition needs to be changed. | 2213 // TODO(kmadhusu): Function definition needs to be changed. |
2205 // fd_in_browser should be the file descriptor of the metafile. | 2214 // fd_in_browser should be the file descriptor of the metafile. |
2206 | 2215 |
2207 // Send the printingDone msg for now. | 2216 // Send the printingDone msg for now. |
2208 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); | 2217 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); |
2209 } | 2218 } |
2210 #endif | 2219 #endif |
OLD | NEW |