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

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: Invert check. 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // request by the render view. Any of the above bits may be set in flags, 517 // request by the render view. Any of the above bits may be set in flags,
518 // which would indicate that this paint message is an ACK for multiple 518 // which would indicate that this paint message is an ACK for multiple
519 // request messages. 519 // request messages.
520 IPC_STRUCT_MEMBER(int, flags) 520 IPC_STRUCT_MEMBER(int, flags)
521 521
522 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this 522 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this
523 // update. True for 2D painting, but false for accelerated compositing. 523 // update. True for 2D painting, but false for accelerated compositing.
524 IPC_STRUCT_MEMBER(bool, needs_ack) 524 IPC_STRUCT_MEMBER(bool, needs_ack)
525 IPC_STRUCT_END() 525 IPC_STRUCT_END()
526 526
527 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
528 // The serialized script value.
529 IPC_STRUCT_MEMBER(string16, data)
530
531 // When sent to the browser, this is the routing ID of the source frame in
532 // the source process. The browser replaces it with the routing ID of the
533 // equivalent (swapped out) frame in the destination process. Set to
534 // MSG_ROUTING_NONE if the source frame isn't supported (e.g., subframes).
535 IPC_STRUCT_MEMBER(int, source_routing_id)
536
537 // The origin of the source frame.
538 IPC_STRUCT_MEMBER(string16, source_origin)
539
540 // The origin for the message's target.
541 IPC_STRUCT_MEMBER(string16, target_origin)
542 IPC_STRUCT_END()
543
527 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params) 544 IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params)
528 // The frame ID for the failure report. 545 // The frame ID for the failure report.
529 IPC_STRUCT_MEMBER(int64, frame_id) 546 IPC_STRUCT_MEMBER(int64, frame_id)
530 // True if this is the top-most frame. 547 // True if this is the top-most frame.
531 IPC_STRUCT_MEMBER(bool, is_main_frame) 548 IPC_STRUCT_MEMBER(bool, is_main_frame)
532 // Error code as reported in the DidFailProvisionalLoad callback. 549 // Error code as reported in the DidFailProvisionalLoad callback.
533 IPC_STRUCT_MEMBER(int, error_code) 550 IPC_STRUCT_MEMBER(int, error_code)
534 // An error message generated from the error_code. This can be an empty 551 // An error message generated from the error_code. This can be an empty
535 // string if we were unable to find a meaningful description. 552 // string if we were unable to find a meaningful description.
536 IPC_STRUCT_MEMBER(string16, error_description) 553 IPC_STRUCT_MEMBER(string16, error_description)
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 // If the fourth parameter is true the result is sent back to the renderer 937 // If the fourth parameter is true the result is sent back to the renderer
921 // using the message ViewHostMsg_ScriptEvalResponse. 938 // using the message ViewHostMsg_ScriptEvalResponse.
922 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the 939 // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the
923 // client can uniquely identify the request. 940 // client can uniquely identify the request.
924 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest, 941 IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
925 string16, /* frame_xpath */ 942 string16, /* frame_xpath */
926 string16, /* jscript_url */ 943 string16, /* jscript_url */
927 int, /* ID */ 944 int, /* ID */
928 bool /* If true, result is sent back. */) 945 bool /* If true, result is sent back. */)
929 946
947 // Posts a message from a frame in another process to the current renderer.
948 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
949 ViewMsg_PostMessage_Params)
950
930 // Request for the renderer to evaluate an xpath to a frame and insert css 951 // Request for the renderer to evaluate an xpath to a frame and insert css
931 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on 952 // into that frame's document. See ViewMsg_ScriptEvalRequest for details on
932 // allowed xpath expressions. 953 // allowed xpath expressions.
933 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest, 954 IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest,
934 string16, /* frame_xpath */ 955 string16, /* frame_xpath */
935 std::string /* css string */) 956 std::string /* css string */)
936 957
937 // External popup menus. 958 // External popup menus.
938 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem, 959 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
939 int /* selected index, -1 means no selection */) 960 int /* selected index, -1 means no selection */)
(...skipping 669 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 ViewMsg_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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 int /* automation_id */) 2053 int /* automation_id */)
2028 2054
2029 // Sent to the browser when the renderer detects it is blocked on a pepper 2055 // Sent to the browser when the renderer detects it is blocked on a pepper
2030 // plugin message for too long. This is also sent when it becomes unhung 2056 // plugin message for too long. This is also sent when it becomes unhung
2031 // (according to the value of is_hung). The browser can give the user the 2057 // (according to the value of is_hung). The browser can give the user the
2032 // option of killing the plugin. 2058 // option of killing the plugin.
2033 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung, 2059 IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung,
2034 int /* plugin_child_id */, 2060 int /* plugin_child_id */,
2035 FilePath /* path */, 2061 FilePath /* path */,
2036 bool /* is_hung */) 2062 bool /* is_hung */)
OLDNEW
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/public/browser/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698