We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / content / common / service_worker / embedded_worker_messages.h
blob557b8a480121646ea50b63bff54f5199d53bbe75
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, pause_after_download)
28 IPC_STRUCT_MEMBER(bool, wait_for_debugger)
29 IPC_STRUCT_MEMBER(content::V8CacheOptions, v8_cache_options)
30 IPC_STRUCT_END()
32 // Parameters structure for EmbeddedWorkerHostMsg_ReportConsoleMessage.
33 // The data members directly correspond to parameters of
34 // WorkerMessagingProxy::reportConsoleMessage()
35 IPC_STRUCT_BEGIN(EmbeddedWorkerHostMsg_ReportConsoleMessage_Params)
36 IPC_STRUCT_MEMBER(int, source_identifier)
37 IPC_STRUCT_MEMBER(int, message_level)
38 IPC_STRUCT_MEMBER(base::string16, message)
39 IPC_STRUCT_MEMBER(int, line_number)
40 IPC_STRUCT_MEMBER(GURL, source_url)
41 IPC_STRUCT_END()
43 // Browser -> Renderer message to create a new embedded worker context.
44 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StartWorker,
45 EmbeddedWorkerMsg_StartWorker_Params /* params */)
47 // Browser -> Renderer message to resume a worker that has been started
48 // with the pause_after_download option.
49 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_ResumeAfterDownload,
50 int /* embedded_worker_id */)
52 // Browser -> Renderer message to stop (terminate) the embedded worker.
53 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker,
54 int /* embedded_worker_id */)
56 // Renderer -> Browser message to indicate that the worker script has been
57 // downloaded and the embedded worker is in paused state.
58 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_DidPauseAfterDownload,
59 int /* embedded_worker_id */)
61 // Renderer -> Browser message to indicate that the worker is ready for
62 // inspection.
63 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerReadyForInspection,
64 int /* embedded_worker_id */)
66 // Renderer -> Browser message to indicate that the worker has loadedd the
67 // script.
68 IPC_MESSAGE_CONTROL3(EmbeddedWorkerHostMsg_WorkerScriptLoaded,
69 int /* embedded_worker_id */,
70 int /* thread_id */,
71 int /* provider_id */)
73 // Renderer -> Browser message to indicate that the worker has failed to load
74 // the script.
75 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerScriptLoadFailed,
76 int /* embedded_worker_id */)
78 // Renderer -> Browser message to indicate that the worker has evaluated the
79 // script.
80 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerScriptEvaluated,
81 int /* embedded_worker_id */,
82 bool /* success */)
84 // Renderer -> Browser message to indicate that the worker is started.
85 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStarted,
86 int /* embedded_worker_id */)
88 // Renderer -> Browser message to indicate that the worker is stopped.
89 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped,
90 int /* embedded_worker_id */)
92 // Renderer -> Browser message to report an exception.
93 IPC_MESSAGE_CONTROL5(EmbeddedWorkerHostMsg_ReportException,
94 int /* embedded_worker_id */,
95 base::string16 /* error_message */,
96 int /* line_number */,
97 int /* column_number */,
98 GURL /* source_url */)
100 // Renderer -> Browser message to report console message.
101 IPC_MESSAGE_CONTROL2(
102 EmbeddedWorkerHostMsg_ReportConsoleMessage,
103 int /* embedded_worker_id */,
104 EmbeddedWorkerHostMsg_ReportConsoleMessage_Params /* params */)
106 // ---------------------------------------------------------------------------
107 // For EmbeddedWorkerContext related messages, which are directly sent from
108 // browser to the worker thread in the child process. We use a new message class
109 // for this for easier cross-thread message dispatching.
111 #undef IPC_MESSAGE_START
112 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart
114 // Browser -> Renderer message to send message.
115 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker,
116 int /* thread_id */,
117 int /* embedded_worker_id */,
118 IPC::Message /* message */)