| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/common/common_param_traits.h" | 10 #include "content/common/common_param_traits.h" | 
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 624   //   ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK | 624   //   ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK | 
| 625   //     Indicates that this is a response to a ViewMsg_Repaint message. | 625   //     Indicates that this is a response to a ViewMsg_Repaint message. | 
| 626   // | 626   // | 
| 627   // If flags is zero, then this message corresponds to an unsoliticed paint | 627   // If flags is zero, then this message corresponds to an unsoliticed paint | 
| 628   // request by the render view.  Any of the above bits may be set in flags, | 628   // request by the render view.  Any of the above bits may be set in flags, | 
| 629   // which would indicate that this paint message is an ACK for multiple | 629   // which would indicate that this paint message is an ACK for multiple | 
| 630   // request messages. | 630   // request messages. | 
| 631   IPC_STRUCT_MEMBER(int, flags) | 631   IPC_STRUCT_MEMBER(int, flags) | 
| 632 IPC_STRUCT_END() | 632 IPC_STRUCT_END() | 
| 633 | 633 | 
| 634 IPC_STRUCT_BEGIN(ViewMsg_ClosePage_Params) | 634 IPC_STRUCT_BEGIN(ViewMsg_SwapOut_Params) | 
| 635   // The identifier of the RenderProcessHost for the currently closing view. | 635   // The identifier of the RenderProcessHost for the currently closing view. | 
| 636   // | 636   // | 
| 637   // These first two parameters are technically redundant since they are | 637   // These first two parameters are technically redundant since they are | 
| 638   // needed only when processing the ACK message, and the processor | 638   // needed only when processing the ACK message, and the processor | 
| 639   // theoretically knows both the process and route ID. However, this is | 639   // theoretically knows both the process and route ID. However, this is | 
| 640   // difficult to figure out with our current implementation, so this | 640   // difficult to figure out with our current implementation, so this | 
| 641   // information is duplicate here. | 641   // information is duplicated here. | 
| 642   IPC_STRUCT_MEMBER(int, closing_process_id) | 642   IPC_STRUCT_MEMBER(int, closing_process_id) | 
| 643 | 643 | 
| 644   // The route identifier for the currently closing RenderView. | 644   // The route identifier for the currently closing RenderView. | 
| 645   IPC_STRUCT_MEMBER(int, closing_route_id) | 645   IPC_STRUCT_MEMBER(int, closing_route_id) | 
| 646 | 646 | 
| 647   // True when this close is for the first (closing) tab of a cross-site |  | 
| 648   // transition where we switch processes. False indicates the close is for the |  | 
| 649   // entire tab. |  | 
| 650   // |  | 
| 651   // When true, the new_* variables below must be filled in. Otherwise they must |  | 
| 652   // both be -1. |  | 
| 653   IPC_STRUCT_MEMBER(bool, for_cross_site_transition) |  | 
| 654 |  | 
| 655   // The identifier of the RenderProcessHost for the new view attempting to | 647   // The identifier of the RenderProcessHost for the new view attempting to | 
| 656   // replace the closing one above. This must be valid when | 648   // replace the closing one above. | 
| 657   // for_cross_site_transition is set, and must be -1 otherwise. |  | 
| 658   IPC_STRUCT_MEMBER(int, new_render_process_host_id) | 649   IPC_STRUCT_MEMBER(int, new_render_process_host_id) | 
| 659 | 650 | 
| 660   // The identifier of the *request* the new view made that is causing the | 651   // The identifier of the *request* the new view made that is causing the | 
| 661   // cross-site transition. This is *not* a route_id, but the request that we | 652   // cross-site transition. This is *not* a route_id, but the request that we | 
| 662   // will resume once the ACK from the closing view has been received. This | 653   // will resume once the ACK from the closing view has been received. | 
| 663   // must be valid when for_cross_site_transition is set, and must be -1 |  | 
| 664   // otherwise. |  | 
| 665   IPC_STRUCT_MEMBER(int, new_request_id) | 654   IPC_STRUCT_MEMBER(int, new_request_id) | 
| 666 IPC_STRUCT_END() | 655 IPC_STRUCT_END() | 
| 667 | 656 | 
| 668 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params) | 657 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params) | 
| 669   // The page_id for this navigation, or -1 if it is a new navigation.  Back, | 658   // The page_id for this navigation, or -1 if it is a new navigation.  Back, | 
| 670   // Forward, and Reload navigations should have a valid page_id.  If the load | 659   // Forward, and Reload navigations should have a valid page_id.  If the load | 
| 671   // succeeds, then this page_id will be reflected in the resultant | 660   // succeeds, then this page_id will be reflected in the resultant | 
| 672   // ViewHostMsg_FrameNavigate message. | 661   // ViewHostMsg_FrameNavigate message. | 
| 673   IPC_STRUCT_MEMBER(int32, page_id) | 662   IPC_STRUCT_MEMBER(int32, page_id) | 
| 674 | 663 | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 789 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden) | 778 IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden) | 
| 790 | 779 | 
| 791 // Tells the render view that it is no longer hidden (see WasHidden), and the | 780 // Tells the render view that it is no longer hidden (see WasHidden), and the | 
| 792 // render view is expected to respond with a full repaint if needs_repainting | 781 // render view is expected to respond with a full repaint if needs_repainting | 
| 793 // is true.  In that case, the generated ViewHostMsg_PaintRect message will | 782 // is true.  In that case, the generated ViewHostMsg_PaintRect message will | 
| 794 // have the IS_RESTORE_ACK flag set.  If needs_repainting is false, then this | 783 // have the IS_RESTORE_ACK flag set.  If needs_repainting is false, then this | 
| 795 // message does not trigger a message in response. | 784 // message does not trigger a message in response. | 
| 796 IPC_MESSAGE_ROUTED1(ViewMsg_WasRestored, | 785 IPC_MESSAGE_ROUTED1(ViewMsg_WasRestored, | 
| 797                     bool /* needs_repainting */) | 786                     bool /* needs_repainting */) | 
| 798 | 787 | 
|  | 788 // Sent to inform the view that it was swapped out.  This allows the process to | 
|  | 789 // exit if no other views are using it. | 
|  | 790 IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut) | 
|  | 791 | 
| 799 // Sent to render the view into the supplied transport DIB, resize | 792 // Sent to render the view into the supplied transport DIB, resize | 
| 800 // the web widget to match the |page_size|, scale it by the | 793 // the web widget to match the |page_size|, scale it by the | 
| 801 // appropriate scale to make it fit the |desired_size|, and return | 794 // appropriate scale to make it fit the |desired_size|, and return | 
| 802 // it.  In response to this message, the host generates a | 795 // it.  In response to this message, the host generates a | 
| 803 // ViewHostMsg_PaintAtSize_ACK message.  Note that the DIB *must* be | 796 // ViewHostMsg_PaintAtSize_ACK message.  Note that the DIB *must* be | 
| 804 // the right size to receive an RGBA image at the |desired_size|. | 797 // the right size to receive an RGBA image at the |desired_size|. | 
| 805 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to | 798 // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to | 
| 806 // identify the PaintAtSize message the ACK belongs to. | 799 // identify the PaintAtSize message the ACK belongs to. | 
| 807 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize, | 800 IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize, | 
| 808                     TransportDIB::Handle /* dib_handle */, | 801                     TransportDIB::Handle /* dib_handle */, | 
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1055 // When a renderer sends a ViewHostMsg_Focus to the browser process, | 1048 // When a renderer sends a ViewHostMsg_Focus to the browser process, | 
| 1056 // the browser has the option of sending a ViewMsg_CantFocus back to | 1049 // the browser has the option of sending a ViewMsg_CantFocus back to | 
| 1057 // the renderer. | 1050 // the renderer. | 
| 1058 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) | 1051 IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) | 
| 1059 | 1052 | 
| 1060 // Instructs the renderer to invoke the frame's shouldClose method, which | 1053 // Instructs the renderer to invoke the frame's shouldClose method, which | 
| 1061 // runs the onbeforeunload event handler.  Expects the result to be returned | 1054 // runs the onbeforeunload event handler.  Expects the result to be returned | 
| 1062 // via ViewHostMsg_ShouldClose. | 1055 // via ViewHostMsg_ShouldClose. | 
| 1063 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) | 1056 IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) | 
| 1064 | 1057 | 
|  | 1058 // Instructs the renderer to swap out for a cross-site transition, including | 
|  | 1059 // running the unload event handler. See the struct above for more details. | 
|  | 1060 // | 
|  | 1061 // Expects a SwapOut_ACK message when finished, where the parameters are | 
|  | 1062 // echoed back. | 
|  | 1063 IPC_MESSAGE_ROUTED1(ViewMsg_SwapOut, | 
|  | 1064                     ViewMsg_SwapOut_Params) | 
|  | 1065 | 
| 1065 // Instructs the renderer to close the current page, including running the | 1066 // Instructs the renderer to close the current page, including running the | 
| 1066 // onunload event handler. See the struct in render_messages.h for more. | 1067 // onunload event handler. | 
| 1067 // | 1068 // | 
| 1068 // Expects a ClosePage_ACK message when finished, where the parameters are | 1069 // Expects a ClosePage_ACK message when finished. | 
| 1069 // echoed back. | 1070 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) | 
| 1070 IPC_MESSAGE_ROUTED1(ViewMsg_ClosePage, |  | 
| 1071                     ViewMsg_ClosePage_Params) |  | 
| 1072 | 1071 | 
| 1073 // Notifies the renderer about ui theme changes | 1072 // Notifies the renderer about ui theme changes | 
| 1074 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) | 1073 IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) | 
| 1075 | 1074 | 
| 1076 // Notifies the renderer that a paint is to be generated for the rectangle | 1075 // Notifies the renderer that a paint is to be generated for the rectangle | 
| 1077 // passed in. | 1076 // passed in. | 
| 1078 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, | 1077 IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, | 
| 1079                     gfx::Size /* The view size to be repainted */) | 1078                     gfx::Size /* The view size to be repainted */) | 
| 1080 | 1079 | 
| 1081 // Notification that a move or resize renderer's containing window has | 1080 // Notification that a move or resize renderer's containing window has | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1297                     int /* active_match_ordinal */, | 1296                     int /* active_match_ordinal */, | 
| 1298                     bool /* final_update */) | 1297                     bool /* final_update */) | 
| 1299 | 1298 | 
| 1300 // Provides the result from running OnMsgShouldClose.  |proceed| matches the | 1299 // Provides the result from running OnMsgShouldClose.  |proceed| matches the | 
| 1301 // return value of the the frame's shouldClose method (which includes the | 1300 // return value of the the frame's shouldClose method (which includes the | 
| 1302 // onbeforeunload handler): true if the user decided to proceed with leaving | 1301 // onbeforeunload handler): true if the user decided to proceed with leaving | 
| 1303 // the page. | 1302 // the page. | 
| 1304 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK, | 1303 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK, | 
| 1305                     bool /* proceed */) | 1304                     bool /* proceed */) | 
| 1306 | 1305 | 
|  | 1306 // Indicates that the current renderer has swapped out, after a SwapOut | 
|  | 1307 // message. The parameters are just echoed from the SwapOut request. | 
|  | 1308 IPC_MESSAGE_ROUTED1(ViewHostMsg_SwapOut_ACK, | 
|  | 1309                     ViewMsg_SwapOut_Params) | 
|  | 1310 | 
| 1307 // Indicates that the current page has been closed, after a ClosePage | 1311 // Indicates that the current page has been closed, after a ClosePage | 
| 1308 // message. The parameters are just echoed from the ClosePage request. | 1312 // message. | 
| 1309 IPC_MESSAGE_ROUTED1(ViewHostMsg_ClosePage_ACK, | 1313 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) | 
| 1310                     ViewMsg_ClosePage_Params) |  | 
| 1311 | 1314 | 
| 1312 // Notifies the browser that we have session history information. | 1315 // Notifies the browser that we have session history information. | 
| 1313 // page_id: unique ID that allows us to distinguish between history entries. | 1316 // page_id: unique ID that allows us to distinguish between history entries. | 
| 1314 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState, | 1317 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState, | 
| 1315                     int32 /* page_id */, | 1318                     int32 /* page_id */, | 
| 1316                     std::string /* state */) | 1319                     std::string /* state */) | 
| 1317 | 1320 | 
| 1318 // Notifies the browser that a document has been loaded in a frame. | 1321 // Notifies the browser that a document has been loaded in a frame. | 
| 1319 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame, | 1322 IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame, | 
| 1320                     int64 /* frame_id */) | 1323                     int64 /* frame_id */) | 
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1954 | 1957 | 
| 1955 // Stores new inspector setting in the profile. | 1958 // Stores new inspector setting in the profile. | 
| 1956 // TODO(jam): this should be in the chrome module | 1959 // TODO(jam): this should be in the chrome module | 
| 1957 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting, | 1960 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting, | 
| 1958                     std::string,  /* key */ | 1961                     std::string,  /* key */ | 
| 1959                     std::string /* value */) | 1962                     std::string /* value */) | 
| 1960 | 1963 | 
| 1961 // Send back a string to be recorded by UserMetrics. | 1964 // Send back a string to be recorded by UserMetrics. | 
| 1962 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction, | 1965 IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction, | 
| 1963                      std::string /* action */) | 1966                      std::string /* action */) | 
| OLD | NEW | 
|---|