dom/system/mac/CoreLocationLocationProvider.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsCOMPtr.h"
     7 #include "nsIGeolocationProvider.h"
     9 /*
    10  * The CoreLocationObjects class contains the CoreLocation objects
    11  * we'll need.
    12  *
    13  * Declaring them directly in CoreLocationLocationProvider
    14  * would require Objective-C++ syntax, which would contaminate all
    15  * files that include this header and require them to be Objective-C++
    16  * as well.
    17  *
    18  * The solution then is to forward-declare CoreLocationObjects here and
    19  * hold a pointer to it in CoreLocationLocationProvider, and only actually
    20  * define it in CoreLocationLocationProvider.mm, thus making it safe
    21  * for nsGeolocation.cpp, which is C++-only, to include this header.
    22  */
    23 class CoreLocationObjects;
    25 class CoreLocationLocationProvider
    26   : public nsIGeolocationProvider
    27 {
    28 public:
    29   NS_DECL_ISUPPORTS
    30   NS_DECL_NSIGEOLOCATIONPROVIDER
    32   CoreLocationLocationProvider();
    33   void NotifyError(uint16_t aErrorCode);
    34   void Update(nsIDOMGeoPosition* aSomewhere);
    35 private:
    36   virtual ~CoreLocationLocationProvider() {};
    38   CoreLocationObjects* mCLObjects;
    39   nsCOMPtr<nsIGeolocationUpdate> mCallback;
    40 };

mercurial