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

Side by Side Diff: content/common/view_messages.h

Issue 9108001: Adds support for calling postMessage on a frame living in a different renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 8 years, 7 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) 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 "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 // request by the render view. Any of the above bits may be set in flags, 516 // request by the render view. Any of the above bits may be set in flags,
517 // which would indicate that this paint message is an ACK for multiple 517 // which would indicate that this paint message is an ACK for multiple
518 // request messages. 518 // request messages.
519 IPC_STRUCT_MEMBER(int, flags) 519 IPC_STRUCT_MEMBER(int, flags)
520 520
521 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this 521 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
522 // update. True for 2D painting, but false for accelerated compositing. 522 // update. True for 2D painting, but false for accelerated compositing.
523 IPC_STRUCT_MEMBER(bool, needs_ack) 523 IPC_STRUCT_MEMBER(bool, needs_ack)
524 IPC_STRUCT_END() 524 IPC_STRUCT_END()
525 525
526 IPC_STRUCT_BEGIN(ViewHostMsg_PostMessage_Params)
527 // The serialized script value.
528 IPC_STRUCT_MEMBER(string16, data)
529
530 // When sent to the browser, this is the routing ID of the source frame in
531 // the source process. The browser replaces it with the routing ID of the
532 // equivalent (swapped out) frame in the destination process. Set to
533 // MSG_ROUTING_NONE if the source frame isn't supported (e.g., subframes).
534 IPC_STRUCT_MEMBER(int, source_routing_id)
535
536 // The origin of the source frame.
537 IPC_STRUCT_MEMBER(string16, source_origin)
538
539 // The origin for the message's target.
540 IPC_STRUCT_MEMBER(string16, target_origin)
541 IPC_STRUCT_END()
542
526 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params) 543 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params)
527 // The frame ID for the failure report. 544 // The frame ID for the failure report.
528 IPC_STRUCT_MEMBER(int64, frame_id) 545 IPC_STRUCT_MEMBER(int64, frame_id)
529 // True if this is the top-most frame. 546 // True if this is the top-most frame.
530 IPC_STRUCT_MEMBER(bool, is_main_frame) 547 IPC_STRUCT_MEMBER(bool, is_main_frame)
531 // Error code as reported in the DidFailProvisionalLoad callback. 548 // Error code as reported in the DidFailProvisionalLoad callback.
532 IPC_STRUCT_MEMBER(int, error_code) 549 IPC_STRUCT_MEMBER(int, error_code)
533 // An error message generated from the error_code. This can be an empty 550 // An error message generated from the error_code. This can be an empty
534 // string if we were unable to find a meaningful description. 551 // string if we were unable to find a meaningful description.
535 IPC_STRUCT_MEMBER(string16, error_description) 552 IPC_STRUCT_MEMBER(string16, error_description)
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // If the fourth parameter is true the result is sent back to the renderer 936 // If the fourth parameter is true the result is sent back to the renderer
920 // using the message ViewHostMsg_ScriptEvalResponse. 937 // using the message ViewHostMsg_ScriptEvalResponse.
921 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the 938 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
922 // client can uniquely identify the request. 939 // client can uniquely identify the request.
923 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest, 940 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
924 string16, /* frame_xpath */ 941 string16, /* frame_xpath */
925 string16, /* jscript_url */ 942 string16, /* jscript_url */
926 int, /* ID */ 943 int, /* ID */
927 bool /* If true, result is sent back. */) 944 bool /* If true, result is sent back. */)
928 945
946 // Posts a message from a frame in another process to the current renderer.
947 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
948 ViewHostMsg_PostMessage_Params)
949
929 // Request for the renderer to evaluate an xpath to a frame and insert css 950 // Request for the renderer to evaluate an xpath to a frame and insert css
930 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on 951 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
931 // allowed xpath expressions. 952 // allowed xpath expressions.
932 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest, 953 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest,
933 string16, /* frame_xpath */ 954 string16, /* frame_xpath */
934 std::string /* css string */) 955 std::string /* css string */)
935 956
936 // External popup menus. 957 // External popup menus.
937 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem, 958 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
938 int /* selected index, -1 means no selection */) 959 int /* selected index, -1 means no selection */)
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 1630
1610 // Used to go to the session history entry at the given offset (ie, -1 will 1631 // Used to go to the session history entry at the given offset (ie, -1 will
1611 // return the "back" item). 1632 // return the "back" item).
1612 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset, 1633 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1613 int /* offset (from current) of history item to get */) 1634 int /* offset (from current) of history item to get */)
1614 1635
1615 // Sent from an inactive renderer for the browser to route to the active 1636 // Sent from an inactive renderer for the browser to route to the active
1616 // renderer, instructing it to close. 1637 // renderer, instructing it to close.
1617 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent) 1638 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1618 1639
1640 // Sent to the browser from an inactive renderer to post a message to the
1641 // active renderer.
1642 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1643 ViewHostMsg_PostMessage_Params)
1644
1619 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage, 1645 IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
1620 string16 /* in - alert message */, 1646 string16 /* in - alert message */,
1621 string16 /* in - default prompt */, 1647 string16 /* in - default prompt */,
1622 GURL /* in - originating page URL */, 1648 GURL /* in - originating page URL */,
1623 ui::JavascriptMessageType /* in - type */, 1649 ui::JavascriptMessageType /* in - type */,
1624 bool /* out - success */, 1650 bool /* out - success */,
1625 string16 /* out - user_input field */) 1651 string16 /* out - user_input field */)
1626 1652
1627 // Requests that the given URL be opened in the specified manner. 1653 // Requests that the given URL be opened in the specified manner.
1628 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL, 1654 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL,
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 int /* automation_id */) 2054 int /* automation_id */)
2029 2055
2030 // Sent to the browser when the renderer detects it is blocked on a pepper 2056 // Sent to the browser when the renderer detects it is blocked on a pepper
2031 // plugin message for too long. This is also sent when it becomes unhung 2057 // plugin message for too long. This is also sent when it becomes unhung
2032 // (according to the value of is_hung). The browser can give the user the 2058 // (according to the value of is_hung). The browser can give the user the
2033 // option of killing the plugin. 2059 // option of killing the plugin.
2034 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung, 2060 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung,
2035 int /* plugin_child_id */, 2061 int /* plugin_child_id */,
2036 FilePath /* path */, 2062 FilePath /* path */,
2037 bool /* is_hung */) 2063 bool /* is_hung */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698