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