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

Side by Side Diff: chrome/common/worker_messages_internal.h

Issue 173193: Updating Worker.postMessage(), DOMWindow.postMessage(), and... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/common/worker_messages.h ('k') | chrome/renderer/webworker_proxy.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <utility> 5 #include <utility>
6 #include <vector>
6 #include "base/string16.h" 7 #include "base/string16.h"
7 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
8 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
9 10
10 11
11 //----------------------------------------------------------------------------- 12 //-----------------------------------------------------------------------------
12 // WorkerProcess messages 13 // WorkerProcess messages
13 // These are messages sent from the browser to the worker process. 14 // These are messages sent from the browser to the worker process.
14 IPC_BEGIN_MESSAGES(WorkerProcess) 15 IPC_BEGIN_MESSAGES(WorkerProcess)
15 IPC_MESSAGE_CONTROL2(WorkerProcessMsg_CreateWorker, 16 IPC_MESSAGE_CONTROL2(WorkerProcessMsg_CreateWorker,
16 GURL /* url */, 17 GURL /* url */,
17 int /* route_id */) 18 int /* route_id */)
18 19
19 // Note: these Message Port related messages can also be sent to the 20 // Note: these Message Port related messages can also be sent to the
20 // renderer process. Putting them here since we don't have a shared place 21 // renderer process. Putting them here since we don't have a shared place
21 // like common_messages_internal.h 22 // like common_messages_internal.h
22 IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message, 23 IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message,
23 string16 /* message */, 24 string16 /* message */,
24 int /* sent_message_port_id */, 25 std::vector<int> /* sent_message_port_ids */,
25 int /* new_routing_id */) 26 std::vector<int> /* new_routing_ids */)
26 27
27 // Tells the Message Port Channel object that there are no more in-flight 28 // Tells the Message Port Channel object that there are no more in-flight
28 // messages arriving. 29 // messages arriving.
29 IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued) 30 IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued)
30 IPC_END_MESSAGES(WorkerProcess) 31 IPC_END_MESSAGES(WorkerProcess)
31 32
32 33
33 //----------------------------------------------------------------------------- 34 //-----------------------------------------------------------------------------
34 // WorkerProcessHost messages 35 // WorkerProcessHost messages
35 // These are messages sent from the worker process to the browser process. 36 // These are messages sent from the worker process to the browser process.
(...skipping 12 matching lines...) Expand all
48 49
49 // Sent when a Message Port Channel object is destroyed. 50 // Sent when a Message Port Channel object is destroyed.
50 IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort, 51 IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort,
51 int /* message_port_id */) 52 int /* message_port_id */)
52 53
53 // Sends a message to a message port. Optionally sends a message port as 54 // Sends a message to a message port. Optionally sends a message port as
54 // as well if sent_message_port_id != MSG_ROUTING_NONE. 55 // as well if sent_message_port_id != MSG_ROUTING_NONE.
55 IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage, 56 IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage,
56 int /* sender_message_port_id */, 57 int /* sender_message_port_id */,
57 string16 /* message */, 58 string16 /* message */,
58 int /* sent_message_port_id */) 59 std::vector<int> /* sent_message_port_ids */)
59 60
60 // Causes messages sent to the remote port to be delivered to this local port. 61 // Causes messages sent to the remote port to be delivered to this local port.
61 IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle, 62 IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle,
62 int /* local_message_port_id */, 63 int /* local_message_port_id */,
63 int /* remote_message_port_id */) 64 int /* remote_message_port_id */)
64 65
65 // Causes the browser to queue messages sent to this port until the the port 66 // Causes the browser to queue messages sent to this port until the the port
66 // has made sure that all in-flight messages were routed to the new 67 // has made sure that all in-flight messages were routed to the new
67 // destination. 68 // destination.
68 IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages, 69 IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages,
(...skipping 14 matching lines...) Expand all
83 IPC_BEGIN_MESSAGES(Worker) 84 IPC_BEGIN_MESSAGES(Worker)
84 IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext, 85 IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext,
85 GURL /* url */, 86 GURL /* url */,
86 string16 /* user_agent */, 87 string16 /* user_agent */,
87 string16 /* source_code */) 88 string16 /* source_code */)
88 89
89 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) 90 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext)
90 91
91 IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage, 92 IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage,
92 string16 /* message */, 93 string16 /* message */,
93 int /* sent_message_port_id */, 94 std::vector<int> /* sent_message_port_ids */,
94 int /* new_routing_id */) 95 std::vector<int> /* new_routing_ids */)
95 96
96 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed) 97 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed)
97 IPC_END_MESSAGES(Worker) 98 IPC_END_MESSAGES(Worker)
98 99
99 100
100 //----------------------------------------------------------------------------- 101 //-----------------------------------------------------------------------------
101 // WorkerHost messages 102 // WorkerHost messages
102 // These are messages sent from the worker process to the renderer process. 103 // These are messages sent from the worker process to the renderer process.
103 IPC_BEGIN_MESSAGES(WorkerHost) 104 IPC_BEGIN_MESSAGES(WorkerHost)
104 // WorkerMsg_PostMessage is also sent here. 105 // WorkerMsg_PostMessage is also sent here.
105 IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject, 106 IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject,
106 string16 /* error_message */, 107 string16 /* error_message */,
107 int /* line_number */, 108 int /* line_number */,
108 string16 /* source_url*/) 109 string16 /* source_url*/)
109 110
110 IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject, 111 IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject,
111 WorkerHostMsg_PostConsoleMessageToWorkerObject_Params) 112 WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
112 113
113 IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject, 114 IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject,
114 bool /* bool has_pending_activity */) 115 bool /* bool has_pending_activity */)
115 116
116 IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity, 117 IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity,
117 bool /* bool has_pending_activity */) 118 bool /* bool has_pending_activity */)
118 119
119 IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed) 120 IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed)
120 IPC_END_MESSAGES(WorkerHost) 121 IPC_END_MESSAGES(WorkerHost)
OLDNEW
« no previous file with comments | « chrome/common/worker_messages.h ('k') | chrome/renderer/webworker_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698