| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // IPC messages for page rendering. | 5 // IPC messages for page rendering. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // equivalent (swapped out) frame in the destination process. | 708 // equivalent (swapped out) frame in the destination process. |
| 709 IPC_STRUCT_MEMBER(int, source_routing_id) | 709 IPC_STRUCT_MEMBER(int, source_routing_id) |
| 710 | 710 |
| 711 // The origin of the source frame. | 711 // The origin of the source frame. |
| 712 IPC_STRUCT_MEMBER(string16, source_origin) | 712 IPC_STRUCT_MEMBER(string16, source_origin) |
| 713 | 713 |
| 714 // The origin for the message's target. | 714 // The origin for the message's target. |
| 715 IPC_STRUCT_MEMBER(string16, target_origin) | 715 IPC_STRUCT_MEMBER(string16, target_origin) |
| 716 IPC_STRUCT_END() | 716 IPC_STRUCT_END() |
| 717 | 717 |
| 718 IPC_STRUCT_BEGIN(ViewMsg_SwapOut_Params) | |
| 719 // The identifier of the RenderProcessHost for the currently closing view. | |
| 720 // | |
| 721 // These first two parameters are technically redundant since they are | |
| 722 // needed only when processing the ACK message, and the processor | |
| 723 // theoretically knows both the process and route ID. However, this is | |
| 724 // difficult to figure out with our current implementation, so this | |
| 725 // information is duplicated here. | |
| 726 IPC_STRUCT_MEMBER(int, closing_process_id) | |
| 727 | |
| 728 // The route identifier for the currently closing RenderView. | |
| 729 IPC_STRUCT_MEMBER(int, closing_route_id) | |
| 730 | |
| 731 // The identifier of the RenderProcessHost for the new view attempting to | |
| 732 // replace the closing one above. | |
| 733 IPC_STRUCT_MEMBER(int, new_render_process_host_id) | |
| 734 | |
| 735 // The identifier of the *request* the new view made that is causing the | |
| 736 // cross-site transition. This is *not* a route_id, but the request that we | |
| 737 // will resume once the ACK from the closing view has been received. | |
| 738 IPC_STRUCT_MEMBER(int, new_request_id) | |
| 739 IPC_STRUCT_END() | |
| 740 | |
| 741 // Messages sent from the browser to the renderer. | 718 // Messages sent from the browser to the renderer. |
| 742 | 719 |
| 743 // Tells the renderer to cancel an opened date/time dialog. | 720 // Tells the renderer to cancel an opened date/time dialog. |
| 744 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog) | 721 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog) |
| 745 | 722 |
| 746 // Get all savable resource links from current webpage, include main | 723 // Get all savable resource links from current webpage, include main |
| 747 // frame and sub-frame. | 724 // frame and sub-frame. |
| 748 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, | 725 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, |
| 749 GURL /* url of page which is needed to save */) | 726 GURL /* url of page which is needed to save */) |
| 750 | 727 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 // the browser has the option of sending a ViewMsg_CantFocus back to | 1091 // the browser has the option of sending a ViewMsg_CantFocus back to |
| 1115 // the renderer. | 1092 // the renderer. |
| 1116 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) | 1093 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) |
| 1117 | 1094 |
| 1118 // Instructs the renderer to invoke the frame's shouldClose method, which | 1095 // Instructs the renderer to invoke the frame's shouldClose method, which |
| 1119 // runs the onbeforeunload event handler. Expects the result to be returned | 1096 // runs the onbeforeunload event handler. Expects the result to be returned |
| 1120 // via ViewHostMsg_ShouldClose. | 1097 // via ViewHostMsg_ShouldClose. |
| 1121 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) | 1098 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) |
| 1122 | 1099 |
| 1123 // Instructs the renderer to swap out for a cross-site transition, including | 1100 // Instructs the renderer to swap out for a cross-site transition, including |
| 1124 // running the unload event handler. See the struct above for more details. | 1101 // running the unload event handler. Expects a SwapOut_ACK message when |
| 1125 // | 1102 // finished. |
| 1126 // Expects a SwapOut_ACK message when finished, where the parameters are | 1103 IPC_MESSAGE_ROUTED0(ViewMsg_SwapOut) |
| 1127 // echoed back. | |
| 1128 IPC_MESSAGE_ROUTED1(ViewMsg_SwapOut, | |
| 1129 ViewMsg_SwapOut_Params) | |
| 1130 | 1104 |
| 1131 // Instructs the renderer to close the current page, including running the | 1105 // Instructs the renderer to close the current page, including running the |
| 1132 // onunload event handler. | 1106 // onunload event handler. |
| 1133 // | 1107 // |
| 1134 // Expects a ClosePage_ACK message when finished. | 1108 // Expects a ClosePage_ACK message when finished. |
| 1135 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) | 1109 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) |
| 1136 | 1110 |
| 1137 // Notifies the renderer about ui theme changes | 1111 // Notifies the renderer about ui theme changes |
| 1138 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) | 1112 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) |
| 1139 | 1113 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 // Provides the result from running OnMsgShouldClose. |proceed| matches the | 1458 // Provides the result from running OnMsgShouldClose. |proceed| matches the |
| 1485 // return value of the the frame's shouldClose method (which includes the | 1459 // return value of the the frame's shouldClose method (which includes the |
| 1486 // onbeforeunload handler): true if the user decided to proceed with leaving | 1460 // onbeforeunload handler): true if the user decided to proceed with leaving |
| 1487 // the page. | 1461 // the page. |
| 1488 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK, | 1462 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK, |
| 1489 bool /* proceed */, | 1463 bool /* proceed */, |
| 1490 base::TimeTicks /* before_unload_start_time */, | 1464 base::TimeTicks /* before_unload_start_time */, |
| 1491 base::TimeTicks /* before_unload_end_time */) | 1465 base::TimeTicks /* before_unload_end_time */) |
| 1492 | 1466 |
| 1493 // Indicates that the current renderer has swapped out, after a SwapOut | 1467 // Indicates that the current renderer has swapped out, after a SwapOut |
| 1494 // message. The parameters are just echoed from the SwapOut request. | 1468 // message. |
| 1495 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapOut_ACK, | 1469 IPC_MESSAGE_ROUTED0(ViewHostMsg_SwapOut_ACK) |
| 1496 ViewMsg_SwapOut_Params) | |
| 1497 | 1470 |
| 1498 // Indicates that the current page has been closed, after a ClosePage | 1471 // Indicates that the current page has been closed, after a ClosePage |
| 1499 // message. | 1472 // message. |
| 1500 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) | 1473 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) |
| 1501 | 1474 |
| 1502 // Notifies the browser that media has started/stopped playing. | 1475 // Notifies the browser that media has started/stopped playing. |
| 1503 IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification, | 1476 IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification, |
| 1504 int64 /* player_cookie, distinguishes instances */, | 1477 int64 /* player_cookie, distinguishes instances */, |
| 1505 bool /* has_video */, | 1478 bool /* has_video */, |
| 1506 bool /* has_audio */, | 1479 bool /* has_audio */, |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 // Since the browser keeps handles to the allocated transport DIBs, this | 2305 // Since the browser keeps handles to the allocated transport DIBs, this |
| 2333 // message is sent to tell the browser that it may release them when the | 2306 // message is sent to tell the browser that it may release them when the |
| 2334 // renderer is finished with them. | 2307 // renderer is finished with them. |
| 2335 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 2308 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
| 2336 TransportDIB::Id /* DIB id */) | 2309 TransportDIB::Id /* DIB id */) |
| 2337 #endif | 2310 #endif |
| 2338 | 2311 |
| 2339 // Adding a new message? Stick to the sort order above: first platform | 2312 // Adding a new message? Stick to the sort order above: first platform |
| 2340 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 2313 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 2341 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 2314 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |