mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
6ee41ffc90
This patch also devirtualizes some of the methods that were not overridden by any derived classes.
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef EditTxn_h__
|
|
#define EditTxn_h__
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
#include "nsISupportsImpl.h"
|
|
#include "nsITransaction.h"
|
|
#include "nsPIEditorTransaction.h"
|
|
#include "nscore.h"
|
|
|
|
/**
|
|
* Base class for all document editing transactions.
|
|
*/
|
|
class EditTxn : public nsITransaction,
|
|
public nsPIEditorTransaction
|
|
{
|
|
public:
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTxn, nsITransaction)
|
|
|
|
virtual void LastRelease() {}
|
|
|
|
NS_IMETHOD RedoTransaction(void) MOZ_OVERRIDE;
|
|
NS_IMETHOD GetIsTransient(bool *aIsTransient) MOZ_OVERRIDE;
|
|
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
|
|
|
|
protected:
|
|
virtual ~EditTxn();
|
|
};
|
|
|
|
#define NS_DECL_EDITTXN \
|
|
NS_IMETHOD DoTransaction() MOZ_OVERRIDE; \
|
|
NS_IMETHOD UndoTransaction() MOZ_OVERRIDE; \
|
|
NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription) MOZ_OVERRIDE;
|
|
|
|
#endif
|