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

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

Issue 178343011: Support dispatching ServiceWorker FetchEvent and receiving response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use const for result on failure Created 6 years, 9 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 "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 #undef IPC_MESSAGE_EXPORT 15 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 17
18 #define IPC_MESSAGE_START ServiceWorkerMsgStart 18 #define IPC_MESSAGE_START ServiceWorkerMsgStart
19 19
20 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, 20 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType,
21 blink::WebServiceWorkerError::ErrorTypeLast) 21 blink::WebServiceWorkerError::ErrorTypeLast)
22 22
23 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) 23 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest)
24 IPC_STRUCT_TRAITS_MEMBER(url) 24 IPC_STRUCT_TRAITS_MEMBER(url)
25 IPC_STRUCT_TRAITS_MEMBER(method) 25 IPC_STRUCT_TRAITS_MEMBER(method)
26 IPC_STRUCT_TRAITS_MEMBER(headers) 26 IPC_STRUCT_TRAITS_MEMBER(headers)
27 IPC_STRUCT_TRAITS_END() 27 IPC_STRUCT_TRAITS_END()
28 28
29 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchResponse) 29 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult,
30 content::SERVICE_WORKER_FETCH_EVENT_LAST)
31
32 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse)
30 IPC_STRUCT_TRAITS_MEMBER(status_code) 33 IPC_STRUCT_TRAITS_MEMBER(status_code)
31 IPC_STRUCT_TRAITS_MEMBER(status_text) 34 IPC_STRUCT_TRAITS_MEMBER(status_text)
32 IPC_STRUCT_TRAITS_MEMBER(method) 35 IPC_STRUCT_TRAITS_MEMBER(method)
33 IPC_STRUCT_TRAITS_MEMBER(headers) 36 IPC_STRUCT_TRAITS_MEMBER(headers)
34 IPC_STRUCT_TRAITS_END() 37 IPC_STRUCT_TRAITS_END()
35 38
36 // Messages sent from the child process to the browser. 39 // Messages sent from the child process to the browser.
37 40
38 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, 41 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker,
39 int32 /* thread_id */, 42 int32 /* thread_id */,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Informs the browser of a ServiceWorkerProvider being destroyed. 86 // Informs the browser of a ServiceWorkerProvider being destroyed.
84 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, 87 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed,
85 int /* provider_id */) 88 int /* provider_id */)
86 89
87 // Informs the browser that install event handling has finished. 90 // Informs the browser that install event handling has finished.
88 // Sent via EmbeddedWorker. If there was an exception during the 91 // Sent via EmbeddedWorker. If there was an exception during the
89 // event handling it'll be reported back separately (to be propagated 92 // event handling it'll be reported back separately (to be propagated
90 // to the documents). 93 // to the documents).
91 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) 94 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished)
92 95
93 // Informs the browser that fetch event handling has finished. 96 // Informs the browser that fetch event handling has finished.
94 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_FetchEventFinished, 97 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished,
95 content::ServiceWorkerFetchResponse) 98 content::ServiceWorkerFetchEventResult,
99 content::ServiceWorkerResponse)
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | content/common/service_worker/service_worker_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698