tor-browser

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

MediaKeyError.cpp (1004B)


      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 #include "MediaKeyError.h"
      8 
      9 #include "mozilla/dom/MediaKeyErrorBinding.h"
     10 #include "nsContentUtils.h"
     11 
     12 namespace mozilla::dom {
     13 
     14 MediaKeyError::MediaKeyError(EventTarget* aOwner, uint32_t aSystemCode)
     15    : Event(aOwner, nullptr, nullptr), mSystemCode(aSystemCode) {
     16  InitEvent(u"error"_ns, CanBubble::eNo, Cancelable::eNo);
     17 }
     18 
     19 MediaKeyError::~MediaKeyError() = default;
     20 
     21 uint32_t MediaKeyError::SystemCode() const { return mSystemCode; }
     22 
     23 JSObject* MediaKeyError::WrapObjectInternal(JSContext* aCx,
     24                                            JS::Handle<JSObject*> aGivenProto) {
     25  return MediaKeyError_Binding::Wrap(aCx, this, aGivenProto);
     26 }
     27 
     28 }  // namespace mozilla::dom