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_docshell_message_utils_h__
8 #define mozilla_dom_docshell_message_utils_h__
10 #include "ipc/EnumSerializer.h"
12 #include "nsDocShellLoadState.h"
13 #include "nsIDocumentViewer.h"
14 #include "mozilla/ScrollbarPreferences.h"
15 #include "mozilla/ipc/IPDLParamTraits.h"
20 struct ParamTraits
<nsDocShellLoadState
*> {
21 static void Write(IPC::MessageWriter
* aWriter
, nsDocShellLoadState
* aParam
);
22 static bool Read(IPC::MessageReader
* aReader
,
23 RefPtr
<nsDocShellLoadState
>* aResult
);
27 struct ParamTraits
<mozilla::ScrollbarPreference
>
28 : public ContiguousEnumSerializerInclusive
<
29 mozilla::ScrollbarPreference
, mozilla::ScrollbarPreference::Auto
,
30 mozilla::ScrollbarPreference::LAST
> {};
33 struct ParamTraits
<mozilla::dom::PermitUnloadResult
>
34 : public ContiguousEnumSerializerInclusive
<
35 mozilla::dom::PermitUnloadResult
,
36 mozilla::dom::PermitUnloadResult::eAllowNavigation
,
37 mozilla::dom::PermitUnloadResult::eRequestBlockNavigation
> {};
40 struct ParamTraits
<mozilla::dom::XPCOMPermitUnloadAction
>
41 : public ContiguousEnumSerializerInclusive
<
42 mozilla::dom::XPCOMPermitUnloadAction
,
43 mozilla::dom::XPCOMPermitUnloadAction::ePrompt
,
44 mozilla::dom::XPCOMPermitUnloadAction::eDontPromptAndUnload
> {};
48 #endif // mozilla_dom_docshell_message_utils_h__