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

Side by Side Diff: content/common/service_worker_messages.h

Issue 127583002: Separate EmbeddedWorker messages into another file to use different msg class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 6 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 // Message definition file, included multiple times, hence no include guard.
6
7 #include "base/strings/string16.h"
8 #include "content/common/service_worker_types.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "ipc/ipc_param_traits.h"
11 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
12 #include "url/gurl.h"
13
14 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest)
15 IPC_STRUCT_TRAITS_MEMBER(url)
16 IPC_STRUCT_TRAITS_MEMBER(method)
17 IPC_STRUCT_TRAITS_MEMBER(headers)
18 IPC_STRUCT_TRAITS_END()
19
20 #undef IPC_MESSAGE_EXPORT
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
22
23 #define IPC_MESSAGE_START ServiceWorkerMsgStart
24
25 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType)
26
27 // Messages sent from the child process to the browser.
28
29 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker,
30 int32 /* thread_id */,
31 int32 /* request_id */,
32 GURL /* scope */,
33 GURL /* script_url */)
34
35 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker,
36 int32 /* thread_id */,
37 int32 /* request_id */,
38 GURL /* scope (url pattern) */)
39
40 // Messages sent from the browser to the child process.
41
42 // Response to ServiceWorkerMsg_RegisterServiceWorker
43 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered,
44 int32 /* thread_id */,
45 int32 /* request_id */,
46 int64 /* service_worker_id */)
47
48 // Response to ServiceWorkerMsg_UnregisterServiceWorker
49 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered,
50 int32 /* thread_id */,
51 int32 /* request_id */)
52
53 // Sent when any kind of registration error occurs during a
54 // RegisterServiceWorker / UnregisterServiceWorker handler above.
55 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError,
56 int32 /* thread_id */,
57 int32 /* request_id */,
58 blink::WebServiceWorkerError::ErrorType /* code */,
59 base::string16 /* message */)
60
61 // Informs the browser of a new ServiceWorkerProvider in the child process,
62 // |provider_id| is unique within its child process.
63 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated,
64 int /* provider_id */)
65
66 // Informs the browser of a ServiceWorkerProvider being destroyed.
67 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed,
68 int /* provider_id */)
69
70 // For EmbeddedWorker related messages -------------------------------------
71
72 // Browser -> Renderer message to create a new embedded worker context.
73 IPC_MESSAGE_CONTROL3(EmbeddedWorkerMsg_StartWorker,
74 int /* embedded_worker_id */,
75 int64 /* service_worker_version_id */,
76 GURL /* script_url */)
77
78 // Browser -> Renderer message to stop (terminate) the embedded worker.
79 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker,
80 int /* embedded_worker_id */)
81
82 // Renderer -> Browser message to indicate that the worker is started.
83 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerStarted,
84 int /* thread_id */,
85 int /* embedded_worker_id */)
86
87 // Renderer -> Browser message to indicate that the worker is stopped.
88 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped,
89 int /* embedded_worker_id */)
90
91 // ---------------------------------------------------------------------------
92 // For EmbeddedWorkerContext related messages, which are directly sent from
93 // browser to the worker thread in the child process. We use a new message class
94 // for this for easier cross-thread message dispatching.
95
96 #undef IPC_MESSAGE_START
97 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart
98
99 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_FetchEvent,
100 int /* thread_id */,
101 int /* embedded_worker_id */,
102 content::ServiceWorkerFetchRequest)
OLDNEW
« no previous file with comments | « content/common/service_worker/service_worker_types.cc ('k') | content/common/service_worker_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698