#include "base/strings/string16.h"
#include "content/common/service_worker/service_worker_status_code.h"
#include "content/common/service_worker/service_worker_types.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START ServiceWorkerMsgStart
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType,
blink::WebServiceWorkerError::ErrorTypeLast)
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerEventResult,
blink::WebServiceWorkerEventResultLast)
IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(method)
IPC_STRUCT_TRAITS_MEMBER(headers)
IPC_STRUCT_TRAITS_END()
IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult,
content::SERVICE_WORKER_FETCH_EVENT_LAST)
IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse)
IPC_STRUCT_TRAITS_MEMBER(status_code)
IPC_STRUCT_TRAITS_MEMBER(status_text)
IPC_STRUCT_TRAITS_MEMBER(method)
IPC_STRUCT_TRAITS_MEMBER(headers)
IPC_STRUCT_TRAITS_END()
IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker,
int32 ,
int32 ,
GURL ,
GURL )
IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker,
int32 ,
int32 ,
GURL )
IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_PostMessage,
int64 ,
base::string16 ,
std::vector<int> )
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated,
int )
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed,
int )
IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_SetVersionId,
int ,
int64 )
IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient,
int ,
int )
IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient,
int ,
int )
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_InstallEventFinished,
blink::WebServiceWorkerEventResult)
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ActivateEventFinished,
blink::WebServiceWorkerEventResult);
IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished,
content::ServiceWorkerFetchEventResult,
content::ServiceWorkerResponse)
IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered,
int32 ,
int32 ,
int64 )
IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered,
int32 ,
int32 )
IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError,
int32 ,
int32 ,
blink::WebServiceWorkerError::ErrorType ,
base::string16 )
IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, int )
IPC_MESSAGE_CONTROL0(ServiceWorkerMsg_ActivateEvent)
IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent,
content::ServiceWorkerFetchRequest)
IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message,
base::string16 ,
std::vector<int> ,
std::vector<int> )
IPC_MESSAGE_CONTROL0(ServiceWorkerMsg_SyncEvent)
IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_SyncEventFinished)