Bug 1750871 - run mochitest-remote on fission everywhere. r=releng-reviewers,aki
[gecko.git] / dom / base / PlacesBookmarkRemoved.h
blobfc465f6b955e57172f91df853d3a3accfda06ba5
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_dom_PlacesBookmarkRemoved_h
8 #define mozilla_dom_PlacesBookmarkRemoved_h
10 #include "mozilla/dom/PlacesBookmark.h"
12 namespace mozilla {
13 namespace dom {
14 class PlacesBookmarkRemoved final : public PlacesBookmark {
15 public:
16 explicit PlacesBookmarkRemoved()
17 : PlacesBookmark(PlacesEventType::Bookmark_removed) {}
19 static already_AddRefed<PlacesBookmarkRemoved> Constructor(
20 const GlobalObject& aGlobal, const PlacesBookmarkRemovedInit& aInitDict) {
21 RefPtr<PlacesBookmarkRemoved> event = new PlacesBookmarkRemoved();
22 event->mItemType = aInitDict.mItemType;
23 event->mId = aInitDict.mId;
24 event->mParentId = aInitDict.mParentId;
25 event->mIndex = aInitDict.mIndex;
26 event->mUrl = aInitDict.mUrl;
27 event->mGuid = aInitDict.mGuid;
28 event->mParentGuid = aInitDict.mParentGuid;
29 event->mSource = aInitDict.mSource;
30 event->mIsTagging = aInitDict.mIsTagging;
31 event->mIsDescendantRemoval = aInitDict.mIsDescendantRemoval;
32 return event.forget();
35 JSObject* WrapObject(JSContext* aCx,
36 JS::Handle<JSObject*> aGivenProto) override {
37 return PlacesBookmarkRemoved_Binding::Wrap(aCx, this, aGivenProto);
40 const PlacesBookmarkRemoved* AsPlacesBookmarkRemoved() const override {
41 return this;
44 int32_t Index() { return mIndex; }
45 bool IsDescendantRemoval() { return mIsDescendantRemoval; }
47 int32_t mIndex;
48 bool mIsDescendantRemoval;
50 private:
51 ~PlacesBookmarkRemoved() = default;
54 } // namespace dom
55 } // namespace mozilla
57 #endif