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

Unified Diff: mandoline/tab/public/interfaces/frame_tree.mojom

Issue 1270313006: Connects PostMessage() for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: mandoline/tab/public/interfaces/frame_tree.mojom
diff --git a/mandoline/tab/public/interfaces/frame_tree.mojom b/mandoline/tab/public/interfaces/frame_tree.mojom
index f49612ce45a0fdbc900292a7be91cbdedbd960ec..245c52105416e0355abefbb373a61e182d5c1f5e 100644
--- a/mandoline/tab/public/interfaces/frame_tree.mojom
+++ b/mandoline/tab/public/interfaces/frame_tree.mojom
@@ -48,13 +48,28 @@ struct FrameData {
map<string, array<uint8>>? client_properties;
};
-struct MessageEvent {
- // TODO(sky): add details.
+// TODO(sky): decide which bits of this make sense for all frames, and move the
+// html specific parts into properties.
+struct HTMLMessageEvent {
+ // The serialized script value.
+ array<uint8>? data;
+
+ // The origin of the source frame.
+ string source_origin;
+
+ // The origin for the message's target.
+ string? target_origin;
+
+ // TODO(sky): these two are not implemented. Figure out what they should be.
+ // Information about the MessagePorts this message contains.
+ // IPC_STRUCT_MEMBER(std::vector<content::TransferredMessagePort>, message_ports)
+ // IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
};
interface FrameTreeServer {
- // TODO(sky): make these real.
- PostMessageEventToFrame(uint32 frame_id, MessageEvent event);
+ PostMessageEventToFrame(uint32 source_frame_id,
+ uint32 target_frame_id,
+ HTMLMessageEvent event);
// Notifies the server that a load has started or stopped in this frame.
// When loading is started, progress is reset to 0, but when loading is
@@ -108,4 +123,8 @@ interface FrameTreeClient {
OnFrameClientPropertyChanged(uint32 frame_id,
string name,
array<uint8>? new_value);
+
+ PostMessage(uint32 source_frame_id,
+ uint32 target_frame_id,
+ HTMLMessageEvent event);
};

Powered by Google App Engine
This is Rietveld 408576698