tor-browser

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

WorkerChannelInfo.h (1363B)


      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
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_dom_WorkerChannel_h
      8 #define mozilla_dom_WorkerChannel_h
      9 
     10 #include "mozilla/OriginAttributes.h"
     11 #include "mozilla/dom/ClientInfo.h"
     12 #include "mozilla/dom/ServiceWorkerDescriptor.h"
     13 #include "nsIChannel.h"
     14 #include "nsILoadInfo.h"
     15 #include "nsIURI.h"
     16 #include "nsIWorkerChannelInfo.h"
     17 #include "nsTArray.h"
     18 
     19 namespace mozilla::dom {
     20 
     21 class WorkerChannelLoadInfo final : public nsIWorkerChannelLoadInfo {
     22 public:
     23  NS_DECL_THREADSAFE_ISUPPORTS;
     24  NS_DECL_NSIWORKERCHANNELLOADINFO;
     25 
     26 private:
     27  ~WorkerChannelLoadInfo() = default;
     28 
     29  uint64_t mWorkerAssociatedBrowsingContextID;
     30 };
     31 
     32 class WorkerChannelInfo final : public nsIWorkerChannelInfo {
     33 public:
     34  NS_DECL_THREADSAFE_ISUPPORTS;
     35  NS_DECL_NSIWORKERCHANNELINFO;
     36 
     37  WorkerChannelInfo(uint64_t aChannelID,
     38                    uint64_t aWorkerAssociatedBrowsingContextID);
     39  WorkerChannelInfo() = delete;
     40 
     41 private:
     42  ~WorkerChannelInfo() = default;
     43 
     44  nsCOMPtr<nsIWorkerChannelLoadInfo> mLoadInfo;
     45  uint64_t mChannelID;
     46 };
     47 
     48 }  // end of namespace mozilla::dom
     49 
     50 #endif