FetchIPCTypes.h (2183B)
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/. */ 6 7 #ifndef mozilla_dom_fetch_IPCUtils_h 8 #define mozilla_dom_fetch_IPCUtils_h 9 10 #include "ipc/EnumSerializer.h" 11 #include "mozilla/dom/BindingIPCUtils.h" 12 #include "mozilla/dom/FetchDriver.h" 13 #include "mozilla/dom/HeadersBinding.h" 14 #include "mozilla/dom/RequestBinding.h" 15 #include "mozilla/dom/ResponseBinding.h" 16 17 namespace IPC { 18 template <> 19 struct ParamTraits<mozilla::dom::HeadersGuardEnum> 20 : public mozilla::dom::WebIDLEnumSerializer< 21 mozilla::dom::HeadersGuardEnum> {}; 22 template <> 23 struct ParamTraits<mozilla::dom::ReferrerPolicy> 24 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::ReferrerPolicy> { 25 }; 26 template <> 27 struct ParamTraits<mozilla::dom::RequestMode> 28 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::RequestMode> {}; 29 template <> 30 struct ParamTraits<mozilla::dom::RequestCredentials> 31 : public mozilla::dom::WebIDLEnumSerializer< 32 mozilla::dom::RequestCredentials> {}; 33 template <> 34 struct ParamTraits<mozilla::dom::RequestCache> 35 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::RequestCache> {}; 36 template <> 37 struct ParamTraits<mozilla::dom::RequestRedirect> 38 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::RequestRedirect> { 39 }; 40 template <> 41 struct ParamTraits<mozilla::dom::RequestPriority> 42 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::RequestPriority> { 43 }; 44 template <> 45 struct ParamTraits<mozilla::dom::ResponseType> 46 : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::ResponseType> {}; 47 48 template <> 49 struct ParamTraits<mozilla::dom::FetchDriverObserver::EndReason> 50 : public ContiguousEnumSerializerInclusive< 51 mozilla::dom::FetchDriverObserver::EndReason, 52 mozilla::dom::FetchDriverObserver::eAborted, 53 mozilla::dom::FetchDriverObserver::eByNetworking> {}; 54 } // namespace IPC 55 56 #endif // mozilla_dom_fetch_IPCUtils_h