tor-browser

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

ServiceWorkerActors.cpp (1501B)


      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 #include "ServiceWorkerActors.h"
      8 
      9 #include "ServiceWorkerChild.h"
     10 #include "ServiceWorkerContainerChild.h"
     11 #include "ServiceWorkerContainerParent.h"
     12 #include "ServiceWorkerParent.h"
     13 #include "ServiceWorkerRegistrationChild.h"
     14 #include "ServiceWorkerRegistrationParent.h"
     15 #include "mozilla/ProfilerMarkers.h"
     16 #include "mozilla/dom/WorkerRef.h"
     17 
     18 namespace mozilla::dom {
     19 
     20 void InitServiceWorkerParent(PServiceWorkerParent* aActor,
     21                             const IPCServiceWorkerDescriptor& aDescriptor) {
     22  auto actor = static_cast<ServiceWorkerParent*>(aActor);
     23  actor->Init(aDescriptor);
     24 }
     25 
     26 void InitServiceWorkerContainerParent(PServiceWorkerContainerParent* aActor) {
     27  auto actor = static_cast<ServiceWorkerContainerParent*>(aActor);
     28  actor->Init();
     29 }
     30 
     31 void InitServiceWorkerRegistrationParent(
     32    PServiceWorkerRegistrationParent* aActor,
     33    const IPCServiceWorkerRegistrationDescriptor& aDescriptor,
     34    const IPCClientInfo& aForClient) {
     35  AUTO_PROFILER_MARKER_UNTYPED("InitServiceWorkerRegistrationParent", DOM, {});
     36  auto actor = static_cast<ServiceWorkerRegistrationParent*>(aActor);
     37  actor->Init(aDescriptor, aForClient);
     38 }
     39 
     40 }  // namespace mozilla::dom