Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / base / PlacesBookmarkKeyword.h
blob949679aeaa1c14b613d4ed76c8ebea0a1170f6d3
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_PlacesBookmarkKeyword_h
8 #define mozilla_dom_PlacesBookmarkKeyword_h
10 #include "mozilla/dom/PlacesBookmarkChanged.h"
12 namespace mozilla {
13 namespace dom {
14 class PlacesBookmarkKeyword final : public PlacesBookmarkChanged {
15 public:
16 explicit PlacesBookmarkKeyword()
17 : PlacesBookmarkChanged(PlacesEventType::Bookmark_keyword_changed) {}
19 static already_AddRefed<PlacesBookmarkKeyword> Constructor(
20 const GlobalObject& aGlobal, const PlacesBookmarkKeywordInit& aInitDict) {
21 RefPtr<PlacesBookmarkKeyword> event = new PlacesBookmarkKeyword();
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->mKeyword = aInitDict.mKeyword;
28 event->mLastModified = aInitDict.mLastModified;
29 event->mSource = aInitDict.mSource;
30 event->mIsTagging = aInitDict.mIsTagging;
31 return event.forget();
34 JSObject* WrapObject(JSContext* aCx,
35 JS::Handle<JSObject*> aGivenProto) override {
36 return PlacesBookmarkKeyword_Binding::Wrap(aCx, this, aGivenProto);
39 const PlacesBookmarkKeyword* AsPlacesBookmarkKeyword() const override {
40 return this;
43 void GetKeyword(nsCString& aKeyword) const { aKeyword = mKeyword; }
44 nsCString mKeyword;
46 private:
47 ~PlacesBookmarkKeyword() = default;
50 } // namespace dom
51 } // namespace mozilla
53 #endif