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

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

Issue 118103002: Add IPC stubs between browser and ServiceWorker's worker context in the child process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 // Message definition file, included multiple times, hence no include guard. 5 // Message definition file, included multiple times, hence no include guard.
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "content/common/service_worker_types.h"
8 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
9 #include "ipc/ipc_param_traits.h" 10 #include "ipc/ipc_param_traits.h"
10 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 11 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
11 #include "url/gurl.h" 12 #include "url/gurl.h"
12 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
13 #undef IPC_MESSAGE_EXPORT 20 #undef IPC_MESSAGE_EXPORT
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
15 22
16 #define IPC_MESSAGE_START ServiceWorkerMsgStart 23 #define IPC_MESSAGE_START ServiceWorkerMsgStart
17 24
18 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) 25 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType)
19 26
20 // Messages sent from the child process to the browser. 27 // Messages sent from the child process to the browser.
21 28
22 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, 29 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, 63 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated,
57 int /* provider_id */) 64 int /* provider_id */)
58 65
59 // Informs the browser of a ServiceWorkerProvider being destroyed. 66 // Informs the browser of a ServiceWorkerProvider being destroyed.
60 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, 67 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed,
61 int /* provider_id */) 68 int /* provider_id */)
62 69
63 // For EmbeddedWorker related messages ------------------------------------- 70 // For EmbeddedWorker related messages -------------------------------------
64 71
65 // Browser -> Renderer message to create a new embedded worker context. 72 // Browser -> Renderer message to create a new embedded worker context.
66 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_StartWorker, 73 IPC_MESSAGE_CONTROL3(EmbeddedWorkerMsg_StartWorker,
67 int /* embedded_worker_id */, 74 int /* embedded_worker_id */,
68 int64 /* service_worker_version_id */, 75 int64 /* service_worker_version_id */,
69 GURL /* script_url */) 76 GURL /* script_url */)
70 77
71 // Browser -> Renderer message to terminate the embedded worker. 78 // Browser -> Renderer message to stop (terminate) the embedded worker.
72 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_TerminateWorker, 79 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker,
73 int /* embedded_worker_id */) 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/browser/service_worker/service_worker_dispatcher_host.cc ('k') | content/common/service_worker_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698