tor-browser

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

WindowsLocationParent.cpp (1106B)


      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 #include "WindowsLocationParent.h"
      7 
      8 #include "WindowsLocationProvider.h"
      9 #include "nsIDOMGeoPosition.h"
     10 
     11 namespace mozilla::dom {
     12 
     13 ::mozilla::ipc::IPCResult WindowsLocationParent::RecvUpdate(
     14    RefPtr<nsIDOMGeoPosition> aGeoPosition) {
     15  if (mProvider) {
     16    mProvider->RecvUpdate(aGeoPosition);
     17  }
     18  return IPC_OK();
     19 }
     20 
     21 // A failure occurred.  This may be translated into a
     22 // nsIGeolocationUpdate::NotifyError or may be ignored if the MLS fallback
     23 // is available.
     24 ::mozilla::ipc::IPCResult WindowsLocationParent::RecvFailed(uint16_t err) {
     25  if (mProvider) {
     26    mProvider->RecvFailed(err);
     27  }
     28  return IPC_OK();
     29 }
     30 
     31 void WindowsLocationParent::ActorDestroy(ActorDestroyReason aReason) {
     32  if (mProvider) {
     33    mProvider->ActorStopped();
     34  }
     35 }
     36 
     37 }  // namespace mozilla::dom