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

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

Issue 205563006: Add a status code to install event handled message from Service Worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment and fix alphabetical ordering Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 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 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/service_worker_status_code.h" 8 #include "content/common/service_worker/service_worker_status_code.h"
9 #include "content/common/service_worker/service_worker_types.h" 9 #include "content/common/service_worker/service_worker_types.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
11 #include "ipc/ipc_param_traits.h" 11 #include "ipc/ipc_param_traits.h"
12 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 12 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
13 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 #undef IPC_MESSAGE_EXPORT 16 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 18
18 #define IPC_MESSAGE_START ServiceWorkerMsgStart 19 #define IPC_MESSAGE_START ServiceWorkerMsgStart
19 20
20 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, 21 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType,
21 blink::WebServiceWorkerError::ErrorTypeLast) 22 blink::WebServiceWorkerError::ErrorTypeLast)
22 23
24 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerEventResult,
25 blink::WebServiceWorkerEventResultLast)
26
23 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) 27 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest)
24 IPC_STRUCT_TRAITS_MEMBER(url) 28 IPC_STRUCT_TRAITS_MEMBER(url)
25 IPC_STRUCT_TRAITS_MEMBER(method) 29 IPC_STRUCT_TRAITS_MEMBER(method)
26 IPC_STRUCT_TRAITS_MEMBER(headers) 30 IPC_STRUCT_TRAITS_MEMBER(headers)
27 IPC_STRUCT_TRAITS_END() 31 IPC_STRUCT_TRAITS_END()
28 32
29 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult, 33 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult,
30 content::SERVICE_WORKER_FETCH_EVENT_LAST) 34 content::SERVICE_WORKER_FETCH_EVENT_LAST)
31 35
32 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse) 36 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 74
71 // Sent when any kind of registration error occurs during a 75 // Sent when any kind of registration error occurs during a
72 // RegisterServiceWorker / UnregisterServiceWorker handler above. 76 // RegisterServiceWorker / UnregisterServiceWorker handler above.
73 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, 77 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError,
74 int32 /* thread_id */, 78 int32 /* thread_id */,
75 int32 /* request_id */, 79 int32 /* request_id */,
76 blink::WebServiceWorkerError::ErrorType /* code */, 80 blink::WebServiceWorkerError::ErrorType /* code */,
77 base::string16 /* message */) 81 base::string16 /* message */)
78 82
79 // Sent via EmbeddedWorker to dispatch install event. 83 // Sent via EmbeddedWorker to dispatch install event.
80 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, 84 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, int /* active_version_id */)
81 int /* active_version_embedded_worker_id */)
82 85
83 // Sent via EmbeddedWorker to dispatch fetch event. 86 // Sent via EmbeddedWorker to dispatch fetch event.
84 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, 87 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent,
85 content::ServiceWorkerFetchRequest) 88 content::ServiceWorkerFetchRequest)
86 89
87 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). 90 // Sends a 'message' event to a service worker (browser->EmbeddedWorker).
88 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, 91 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message,
89 base::string16 /* message */, 92 base::string16 /* message */,
90 std::vector<int> /* sent_message_port_ids */, 93 std::vector<int> /* sent_message_port_ids */,
91 std::vector<int> /* new_routing_ids */) 94 std::vector<int> /* new_routing_ids */)
(...skipping 11 matching lines...) Expand all
103 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, 106 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient,
104 int /* thread_id */, 107 int /* thread_id */,
105 int /* provider_id */) 108 int /* provider_id */)
106 109
107 // Informs the browser that the scriptable API client is unregistered. 110 // Informs the browser that the scriptable API client is unregistered.
108 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, 111 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient,
109 int /* thread_id */, 112 int /* thread_id */,
110 int /* provider_id */) 113 int /* provider_id */)
111 114
112 // Informs the browser that install event handling has finished. 115 // Informs the browser that install event handling has finished.
113 // Sent via EmbeddedWorker. If there was an exception during the 116 // Sent via EmbeddedWorker.
114 // event handling it'll be reported back separately (to be propagated 117 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_InstallEventFinished,
115 // to the documents). 118 blink::WebServiceWorkerEventResult)
116 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished)
117 119
118 // Informs the browser that fetch event handling has finished. 120 // Informs the browser that fetch event handling has finished.
121 // Sent via EmbeddedWorker.
119 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished, 122 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished,
120 content::ServiceWorkerFetchEventResult, 123 content::ServiceWorkerFetchEventResult,
121 content::ServiceWorkerResponse) 124 content::ServiceWorkerResponse)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698