1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Message definition file, included multiple times, hence no include guard.
9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_message_macros.h"
11 #include "ipc/ipc_param_traits.h"
14 #undef IPC_MESSAGE_EXPORT
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 #define IPC_MESSAGE_START EmbeddedWorkerMsgStart
19 // Browser -> Renderer message to create a new embedded worker context.
20 IPC_MESSAGE_CONTROL3(EmbeddedWorkerMsg_StartWorker,
21 int /* embedded_worker_id */,
22 int64 /* service_worker_version_id */,
23 GURL /* script_url */)
25 // Browser -> Renderer message to stop (terminate) the embedded worker.
26 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker,
27 int /* embedded_worker_id */)
29 // Renderer -> Browser message to indicate that the worker is started.
30 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerStarted,
32 int /* embedded_worker_id */)
34 // Renderer -> Browser message to indicate that the worker is stopped.
35 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped,
36 int /* embedded_worker_id */)
38 // Renderer ->Browser message to send message.
39 // |request_id| might be used for bi-directional messaging.
40 IPC_MESSAGE_CONTROL3(EmbeddedWorkerHostMsg_SendMessageToBrowser,
41 int /* embedded_worker_id */,
43 IPC::Message /* message */)
45 // ---------------------------------------------------------------------------
46 // For EmbeddedWorkerContext related messages, which are directly sent from
47 // browser to the worker thread in the child process. We use a new message class
48 // for this for easier cross-thread message dispatching.
50 #undef IPC_MESSAGE_START
51 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart
53 // Browser -> Renderer message to send message.
54 // |request_id| might be used for bi-directional messaging.
55 IPC_MESSAGE_CONTROL4(EmbeddedWorkerContextMsg_SendMessageToWorker,
57 int /* embedded_worker_id */,
59 IPC::Message /* message */)