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

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

Issue 1046933005: Refactor postMessage for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's nits Created 5 years, 8 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
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // Whether to enable auto-resize. 529 // Whether to enable auto-resize.
530 IPC_STRUCT_MEMBER(bool, enable_auto_resize) 530 IPC_STRUCT_MEMBER(bool, enable_auto_resize)
531 531
532 // The minimum size to layout the page if auto-resize is enabled. 532 // The minimum size to layout the page if auto-resize is enabled.
533 IPC_STRUCT_MEMBER(gfx::Size, min_size) 533 IPC_STRUCT_MEMBER(gfx::Size, min_size)
534 534
535 // The maximum size to layout the page if auto-resize is enabled. 535 // The maximum size to layout the page if auto-resize is enabled.
536 IPC_STRUCT_MEMBER(gfx::Size, max_size) 536 IPC_STRUCT_MEMBER(gfx::Size, max_size)
537 IPC_STRUCT_END() 537 IPC_STRUCT_END()
538 538
539 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
540 // Whether the data format is supplied as serialized script value, or as
541 // a simple string. If it is a raw string, must be converted from string to a
542 // WebSerializedScriptValue in renderer.
543 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
544 // The serialized script value.
545 IPC_STRUCT_MEMBER(base::string16, data)
546 // When sent to the browser, this is the routing ID of the source frame in
547 // the source process. The browser replaces it with the routing ID of the
548 // equivalent (swapped out) frame in the destination process.
549 IPC_STRUCT_MEMBER(int, source_routing_id)
550
551 // The origin of the source frame.
552 IPC_STRUCT_MEMBER(base::string16, source_origin)
553
554 // The origin for the message's target.
555 IPC_STRUCT_MEMBER(base::string16, target_origin)
556
557 // Information about the MessagePorts this message contains.
558 IPC_STRUCT_MEMBER(std::vector<content::TransferredMessagePort>, message_ports)
559 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
560 IPC_STRUCT_END()
561
562 // Messages sent from the browser to the renderer. 539 // Messages sent from the browser to the renderer.
563 540
564 #if defined(OS_ANDROID) 541 #if defined(OS_ANDROID)
565 // Tells the renderer to cancel an opened date/time dialog. 542 // Tells the renderer to cancel an opened date/time dialog.
566 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog) 543 IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog)
567 544
568 // Replaces a date time input field. 545 // Replaces a date time input field.
569 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime, 546 IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime,
570 double /* dialog_value */) 547 double /* dialog_value */)
571 548
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt, 682 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
706 gfx::Point, /* location */ 683 gfx::Point, /* location */
707 blink::WebMediaPlayerAction) 684 blink::WebMediaPlayerAction)
708 685
709 // Tells the renderer to perform the given action on the plugin located at 686 // Tells the renderer to perform the given action on the plugin located at
710 // the given point. 687 // the given point.
711 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt, 688 IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt,
712 gfx::Point, /* location */ 689 gfx::Point, /* location */
713 blink::WebPluginAction) 690 blink::WebPluginAction)
714 691
715 // Posts a message from a frame in another process to the current renderer.
716 IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
717 ViewMsg_PostMessage_Params)
718
719 // Resets the page scale for the current main frame to the default page scale. 692 // Resets the page scale for the current main frame to the default page scale.
720 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageScale) 693 IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageScale)
721 694
722 // Change the zoom level for the current main frame. If the level actually 695 // Change the zoom level for the current main frame. If the level actually
723 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser 696 // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser
724 // telling it what url got zoomed and what its current zoom level is. 697 // telling it what url got zoomed and what its current zoom level is.
725 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom, 698 IPC_MESSAGE_ROUTED1(ViewMsg_Zoom,
726 content::PageZoom /* function */) 699 content::PageZoom /* function */)
727 700
728 // Set the zoom level for a particular url that the renderer is in the 701 // Set the zoom level for a particular url that the renderer is in the
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 1253
1281 // Used to go to the session history entry at the given offset (ie, -1 will 1254 // Used to go to the session history entry at the given offset (ie, -1 will
1282 // return the "back" item). 1255 // return the "back" item).
1283 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset, 1256 IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
1284 int /* offset (from current) of history item to get */) 1257 int /* offset (from current) of history item to get */)
1285 1258
1286 // Sent from an inactive renderer for the browser to route to the active 1259 // Sent from an inactive renderer for the browser to route to the active
1287 // renderer, instructing it to close. 1260 // renderer, instructing it to close.
1288 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent) 1261 IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
1289 1262
1290 // Sent to the browser from an inactive renderer to post a message to the
1291 // active renderer.
1292 IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
1293 ViewMsg_PostMessage_Params)
1294
1295 // Notifies that the preferred size of the content changed. 1263 // Notifies that the preferred size of the content changed.
1296 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange, 1264 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1297 gfx::Size /* pref_size */) 1265 gfx::Size /* pref_size */)
1298 1266
1299 // Notifies whether there are JavaScript touch event handlers or not. 1267 // Notifies whether there are JavaScript touch event handlers or not.
1300 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers, 1268 IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
1301 bool /* has_handlers */) 1269 bool /* has_handlers */)
1302 1270
1303 // A message from HTML-based UI. When (trusted) Javascript calls 1271 // A message from HTML-based UI. When (trusted) Javascript calls
1304 // send(message, args), this message is sent to the browser. 1272 // send(message, args), this message is sent to the browser.
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters 1642 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1675 // for details. 1643 // for details.
1676 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, 1644 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1677 LOGFONT /* font_data */, 1645 LOGFONT /* font_data */,
1678 base::string16 /* characters */) 1646 base::string16 /* characters */)
1679 #endif 1647 #endif
1680 1648
1681 // Adding a new message? Stick to the sort order above: first platform 1649 // Adding a new message? Stick to the sort order above: first platform
1682 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1650 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1683 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1651 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698