tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ViewTransitionTypeSet.h (1331B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      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
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef DOM_VIEWTRANSITIONTYPESET_H_
      8 #define DOM_VIEWTRANSITIONTYPESET_H_
      9 
     10 #include "nsCycleCollectionParticipant.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla {
     14 class ErrorResult;
     15 namespace dom {
     16 
     17 class ViewTransition;
     18 
     19 class ViewTransitionTypeSet final : public nsISupports, public nsWrapperCache {
     20 public:
     21  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     22  NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ViewTransitionTypeSet)
     23 
     24 public:
     25  explicit ViewTransitionTypeSet(ViewTransition&);
     26 
     27  MOZ_CAN_RUN_SCRIPT ViewTransitionTypeSet* Add(const nsAString&, ErrorResult&);
     28  MOZ_CAN_RUN_SCRIPT void Clear(ErrorResult&);
     29  MOZ_CAN_RUN_SCRIPT bool Delete(const nsAString&, ErrorResult&);
     30 
     31 protected:
     32  ~ViewTransitionTypeSet();
     33 
     34 public:
     35  nsISupports* GetParentObject() const;
     36 
     37  JSObject* WrapObject(JSContext* aCx,
     38                       JS::Handle<JSObject*> aGivenProto) override;
     39 
     40  RefPtr<ViewTransition> mTransition;
     41 };
     42 
     43 }  // namespace dom
     44 }  // namespace mozilla
     45 
     46 #endif  // DOM_VIEWTRANSITIONTYPESET_H_