Backed out 9 changesets (bug 1846848) for causing multiple build bustages. CLOSED...
[gecko.git] / dom / base / PlacesBookmarkGuid.h
blob1d58b034524dd1c4345e525572e867c521e90abe
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_PlacesBookmarkGuid_h
8 #define mozilla_dom_PlacesBookmarkGuid_h
10 #include "mozilla/dom/PlacesBookmarkChanged.h"
12 namespace mozilla {
13 namespace dom {
14 class PlacesBookmarkGuid final : public PlacesBookmarkChanged {
15 public:
16 explicit PlacesBookmarkGuid()
17 : PlacesBookmarkChanged(PlacesEventType::Bookmark_guid_changed) {}
19 static already_AddRefed<PlacesBookmarkGuid> Constructor(
20 const GlobalObject& aGlobal, const PlacesBookmarkGuidInit& aInitDict) {
21 RefPtr<PlacesBookmarkGuid> event = new PlacesBookmarkGuid();
22 event->mId = aInitDict.mId;
23 event->mItemType = aInitDict.mItemType;
24 event->mUrl = aInitDict.mUrl;
25 event->mGuid = aInitDict.mGuid;
26 event->mParentGuid = aInitDict.mParentGuid;
27 event->mLastModified = aInitDict.mLastModified;
28 event->mSource = aInitDict.mSource;
29 event->mIsTagging = aInitDict.mIsTagging;
30 return event.forget();
33 JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override {
35 return PlacesBookmarkGuid_Binding::Wrap(aCx, this, aGivenProto);
38 const PlacesBookmarkGuid* AsPlacesBookmarkGuid() const override {
39 return this;
42 private:
43 ~PlacesBookmarkGuid() = default;
46 } // namespace dom
47 } // namespace mozilla
49 #endif