tor-browser

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

RTCTransformEventRunnable.h (1318B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=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
      5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCTRANSFORMEVENTRUNNABLE_H_
      8 #define MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCTRANSFORMEVENTRUNNABLE_H_
      9 
     10 #include "mozilla/dom/EventWithOptionsRunnable.h"
     11 
     12 namespace mozilla {
     13 
     14 class FrameTransformerProxy;
     15 
     16 namespace dom {
     17 
     18 // Cargo-culted from MesssageEventRunnable.
     19 // TODO: Maybe could subclass WorkerRunnable instead? Comments on
     20 // WorkerDebuggeeRunnable indicate that firing an event at JS means we need that
     21 // class.
     22 class RTCTransformEventRunnable final : public EventWithOptionsRunnable {
     23 public:
     24  RTCTransformEventRunnable(Worker& aWorker, FrameTransformerProxy* aProxy);
     25 
     26  already_AddRefed<Event> BuildEvent(
     27      JSContext* aCx, nsIGlobalObject* aGlobal, EventTarget* aTarget,
     28      JS::Handle<JS::Value> aTransformerOptions) override;
     29 
     30 private:
     31  virtual ~RTCTransformEventRunnable();
     32  RefPtr<FrameTransformerProxy> mProxy;
     33 };
     34 
     35 }  // namespace dom
     36 }  // namespace mozilla
     37 
     38 #endif  // MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCTRANSFORMEVENTRUNNABLE_H_