1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_fetch_IPCUtils_h
8 #define mozilla_dom_fetch_IPCUtils_h
10 #include "ipc/EnumSerializer.h"
12 #include "mozilla/dom/HeadersBinding.h"
13 #include "mozilla/dom/RequestBinding.h"
14 #include "mozilla/dom/ResponseBinding.h"
18 struct ParamTraits
<mozilla::dom::HeadersGuardEnum
>
19 : public ContiguousEnumSerializer
<
20 mozilla::dom::HeadersGuardEnum
, mozilla::dom::HeadersGuardEnum::None
,
21 mozilla::dom::HeadersGuardEnum::EndGuard_
> {};
23 struct ParamTraits
<mozilla::dom::ReferrerPolicy
>
24 : public ContiguousEnumSerializer
<mozilla::dom::ReferrerPolicy
,
25 mozilla::dom::ReferrerPolicy::_empty
,
26 mozilla::dom::ReferrerPolicy::EndGuard_
> {
29 struct ParamTraits
<mozilla::dom::RequestMode
>
30 : public ContiguousEnumSerializer
<mozilla::dom::RequestMode
,
31 mozilla::dom::RequestMode::Same_origin
,
32 mozilla::dom::RequestMode::EndGuard_
> {};
34 struct ParamTraits
<mozilla::dom::RequestCredentials
>
35 : public ContiguousEnumSerializer
<
36 mozilla::dom::RequestCredentials
,
37 mozilla::dom::RequestCredentials::Omit
,
38 mozilla::dom::RequestCredentials::EndGuard_
> {};
40 struct ParamTraits
<mozilla::dom::RequestCache
>
41 : public ContiguousEnumSerializer
<mozilla::dom::RequestCache
,
42 mozilla::dom::RequestCache::Default
,
43 mozilla::dom::RequestCache::EndGuard_
> {};
45 struct ParamTraits
<mozilla::dom::RequestRedirect
>
46 : public ContiguousEnumSerializer
<
47 mozilla::dom::RequestRedirect
, mozilla::dom::RequestRedirect::Follow
,
48 mozilla::dom::RequestRedirect::EndGuard_
> {};
50 struct ParamTraits
<mozilla::dom::ResponseType
>
51 : public ContiguousEnumSerializer
<mozilla::dom::ResponseType
,
52 mozilla::dom::ResponseType::Basic
,
53 mozilla::dom::ResponseType::EndGuard_
> {};
56 #endif // mozilla_dom_fetch_IPCUtils_h