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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_permissiondelegateipcutils_h
8 #define mozilla_permissiondelegateipcutils_h
10 #include "ipc/IPCMessageUtils.h"
12 #include "mozilla/PermissionDelegateHandler.h"
18 mozilla::PermissionDelegateHandler::DelegatedPermissionList
> {
19 typedef mozilla::PermissionDelegateHandler::DelegatedPermissionList paramType
;
21 static void Write(MessageWriter
* aWriter
, const paramType
& aParam
) {
22 for (auto& permission
: aParam
.mPermissions
) {
23 WriteParam(aWriter
, permission
);
27 static bool Read(MessageReader
* aReader
, paramType
* aResult
) {
28 for (auto& permission
: aResult
->mPermissions
) {
29 if (!ReadParam(aReader
, &permission
)) {
40 #endif // mozilla_permissiondelegateipcutils_h