OLD | NEW |
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 // Defines messages between the browser and worker process, as well as between | 5 // Defines messages between the browser and worker process, as well as between |
6 // the renderer and worker process. | 6 // the renderer and worker process. |
7 | 7 |
8 // Multiply-included message file, hence no include guard. | 8 // Multiply-included message file, hence no include guard. |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/common/content_param_traits.h" | 16 #include "content/common/content_param_traits.h" |
| 17 #include "content/common/message_port.h" |
17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
18 #include "ipc/ipc_message_utils.h" | 19 #include "ipc/ipc_message_utils.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 | 21 |
21 #undef IPC_MESSAGE_EXPORT | 22 #undef IPC_MESSAGE_EXPORT |
22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
23 #define IPC_MESSAGE_START WorkerMsgStart | 24 #define IPC_MESSAGE_START WorkerMsgStart |
24 | 25 |
25 // Parameters structure for WorkerHostMsg_PostConsoleMessageToWorkerObject, | 26 // Parameters structure for WorkerHostMsg_PostConsoleMessageToWorkerObject, |
26 // which has too many data parameters to be reasonably put in a predefined | 27 // which has too many data parameters to be reasonably put in a predefined |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Sent by the worker process to request being killed. | 73 // Sent by the worker process to request being killed. |
73 IPC_SYNC_MESSAGE_CONTROL0_0(WorkerProcessHostMsg_ForceKillWorker) | 74 IPC_SYNC_MESSAGE_CONTROL0_0(WorkerProcessHostMsg_ForceKillWorker) |
74 | 75 |
75 | 76 |
76 //----------------------------------------------------------------------------- | 77 //----------------------------------------------------------------------------- |
77 // Worker messages | 78 // Worker messages |
78 // These are messages sent from the renderer process to the worker process. | 79 // These are messages sent from the renderer process to the worker process. |
79 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) | 80 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) |
80 | 81 |
81 IPC_MESSAGE_ROUTED2(WorkerMsg_Connect, | 82 IPC_MESSAGE_ROUTED2(WorkerMsg_Connect, |
82 int /* sent_message_port_id */, | 83 int /* connection_request_id */, |
83 int /* routing_id */) | 84 content::MessagePort /* sent_message_port */) |
84 | 85 |
85 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed) | 86 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed) |
86 | 87 |
87 | 88 |
88 //----------------------------------------------------------------------------- | 89 //----------------------------------------------------------------------------- |
89 // WorkerHost messages | 90 // WorkerHost messages |
90 // These are messages sent from the worker (renderer process) to the worker | 91 // These are messages sent from the worker (renderer process) to the worker |
91 // host (browser process). | 92 // host (browser process). |
92 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed, | 93 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed, |
93 int /* worker_route_id */) | 94 int /* worker_route_id */) |
94 | 95 |
95 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextDestroyed, | 96 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextDestroyed, |
96 int /* worker_route_id */) | 97 int /* worker_route_id */) |
97 | 98 |
98 // Renderer -> Browser message to indicate that the worker is ready for | 99 // Renderer -> Browser message to indicate that the worker is ready for |
99 // inspection. | 100 // inspection. |
100 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerReadyForInspection, | 101 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerReadyForInspection, |
101 int /* worker_route_id */) | 102 int /* worker_route_id */) |
102 | 103 |
103 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerScriptLoaded, | 104 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerScriptLoaded, |
104 int /* worker_route_id */) | 105 int /* worker_route_id */) |
105 | 106 |
106 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerScriptLoadFailed, | 107 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerScriptLoadFailed, |
107 int /* worker_route_id */) | 108 int /* worker_route_id */) |
108 | 109 |
109 IPC_MESSAGE_CONTROL2(WorkerHostMsg_WorkerConnected, | 110 IPC_MESSAGE_CONTROL2(WorkerHostMsg_WorkerConnected, |
110 int /* message_port_id */, | 111 int /* connection_request_id */, |
111 int /* worker_route_id */) | 112 int /* worker_route_id */) |
OLD | NEW |