1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef EditAggregateTransaction_h
7 #define EditAggregateTransaction_h
9 #include "EditTransactionBase.h"
11 #include "mozilla/OwningNonNull.h"
12 #include "mozilla/RefPtr.h"
16 #include "nsCycleCollectionParticipant.h"
18 #include "nsISupportsImpl.h"
23 * base class for all document editing transactions that require aggregation.
24 * provides a list of child transactions.
26 class EditAggregateTransaction
: public EditTransactionBase
{
28 NS_DECL_ISUPPORTS_INHERITED
29 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(EditAggregateTransaction
,
32 NS_DECL_EDITTRANSACTIONBASE
34 MOZ_CAN_RUN_SCRIPT NS_IMETHOD
RedoTransaction() override
;
35 NS_IMETHOD
Merge(nsITransaction
* aOtherTransaction
, bool* aDidMerge
) override
;
38 * Get the name assigned to this transaction.
40 nsAtom
* GetName() const;
42 const nsTArray
<OwningNonNull
<EditTransactionBase
>>& ChildTransactions()
48 EditAggregateTransaction() = default;
49 virtual ~EditAggregateTransaction() = default;
51 nsTArray
<OwningNonNull
<EditTransactionBase
>> mChildren
;
55 } // namespace mozilla
57 #endif // #ifndef EditAggregateTransaction_h