WindowsLocationChild.h (1315B)
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_WindowsLocationChild_h__ 8 #define mozilla_dom_WindowsLocationChild_h__ 9 10 #include "mozilla/WeakPtr.h" 11 #include "mozilla/dom/PWindowsLocationChild.h" 12 13 class ILocation; 14 15 namespace mozilla::dom { 16 17 // Geolocation actor in utility process. 18 class WindowsLocationChild final : public PWindowsLocationChild, 19 public SupportsWeakPtr { 20 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WindowsLocationChild, override); 21 22 public: 23 WindowsLocationChild(); 24 25 using IPCResult = ::mozilla::ipc::IPCResult; 26 27 IPCResult RecvStartup(); 28 IPCResult RecvRegisterForReport(); 29 IPCResult RecvUnregisterForReport(); 30 IPCResult RecvSetHighAccuracy(bool aEnable); 31 void ActorDestroy(ActorDestroyReason aWhy) override; 32 33 private: 34 ~WindowsLocationChild() override; 35 36 // The COM object the actors are proxying calls for. 37 RefPtr<ILocation> mLocation; 38 39 bool mHighAccuracy = false; 40 }; 41 42 } // namespace mozilla::dom 43 44 #endif // mozilla_dom_WindowsLocationChild_h__