Update V8 to version 4.6.72.
[chromium-blink-merge.git] / content / common / service_worker / embedded_worker_messages.h
blob56216ca4fa3945b341d6b9f2fefe72ec5f586aa4
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.
7 #include <string>
9 #include "content/public/common/web_preferences.h"
10 #include "ipc/ipc_message.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_param_traits.h"
13 #include "url/gurl.h"
15 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
18 #define IPC_MESSAGE_START EmbeddedWorkerMsgStart
20 // Parameters structure for EmbeddedWorkerMsg_StartWorker.
21 IPC_STRUCT_BEGIN(EmbeddedWorkerMsg_StartWorker_Params)
22 IPC_STRUCT_MEMBER(int, embedded_worker_id)
23 IPC_STRUCT_MEMBER(int64, service_worker_version_id)
24 IPC_STRUCT_MEMBER(GURL, scope)
25 IPC_STRUCT_MEMBER(GURL, script_url)
26 IPC_STRUCT_MEMBER(int, worker_devtools_agent_route_id)
27 IPC_STRUCT_MEMBER(bool, wait_for_debugger)
28 IPC_STRUCT_MEMBER(content::V8CacheOptions, v8_cache_options)
29 IPC_STRUCT_END()
31 // Parameters structure for EmbeddedWorkerHostMsg_ReportConsoleMessage.
32 // The data members directly correspond to parameters of
33 // WorkerMessagingProxy::reportConsoleMessage()
34 IPC_STRUCT_BEGIN(EmbeddedWorkerHostMsg_ReportConsoleMessage_Params)
35 IPC_STRUCT_MEMBER(int, source_identifier)
36 IPC_STRUCT_MEMBER(int, message_level)
37 IPC_STRUCT_MEMBER(base::string16, message)
38 IPC_STRUCT_MEMBER(int, line_number)
39 IPC_STRUCT_MEMBER(GURL, source_url)
40 IPC_STRUCT_END()
42 // Browser -> Renderer message to create a new embedded worker context.
43 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StartWorker,
44 EmbeddedWorkerMsg_StartWorker_Params /* params */)
46 // Browser -> Renderer message to stop (terminate) the embedded worker.
47 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker,
48 int /* embedded_worker_id */)
50 // Renderer -> Browser message to indicate that the worker is ready for
51 // inspection.
52 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerReadyForInspection,
53 int /* embedded_worker_id */)
55 // Renderer -> Browser message to indicate that the worker has loadedd the
56 // script.
57 IPC_MESSAGE_CONTROL3(EmbeddedWorkerHostMsg_WorkerScriptLoaded,
58 int /* embedded_worker_id */,
59 int /* thread_id */,
60 int /* provider_id */)
62 // Renderer -> Browser message to indicate that the worker has failed to load
63 // the script.
64 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerScriptLoadFailed,
65 int /* embedded_worker_id */)
67 // Renderer -> Browser message to indicate that the worker has evaluated the
68 // script.
69 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerScriptEvaluated,
70 int /* embedded_worker_id */,
71 bool /* success */)
73 // Renderer -> Browser message to indicate that the worker is started.
74 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStarted,
75 int /* embedded_worker_id */)
77 // Renderer -> Browser message to indicate that the worker is stopped.
78 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped,
79 int /* embedded_worker_id */)
81 // Renderer -> Browser message to report an exception.
82 IPC_MESSAGE_CONTROL5(EmbeddedWorkerHostMsg_ReportException,
83 int /* embedded_worker_id */,
84 base::string16 /* error_message */,
85 int /* line_number */,
86 int /* column_number */,
87 GURL /* source_url */)
89 // Renderer -> Browser message to report console message.
90 IPC_MESSAGE_CONTROL2(
91 EmbeddedWorkerHostMsg_ReportConsoleMessage,
92 int /* embedded_worker_id */,
93 EmbeddedWorkerHostMsg_ReportConsoleMessage_Params /* params */)
95 // ---------------------------------------------------------------------------
96 // For EmbeddedWorkerContext related messages, which are directly sent from
97 // browser to the worker thread in the child process. We use a new message class
98 // for this for easier cross-thread message dispatching.
100 #undef IPC_MESSAGE_START
101 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart
103 // Browser -> Renderer message to send message.
104 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker,
105 int /* thread_id */,
106 int /* embedded_worker_id */,
107 IPC::Message /* message */)