Bug 569680 - Move the platform specific geolocation files. r=dougt
authorMike Kristoffersen <mkristoffersen@mozilla.com>
Wed, 14 Jul 2010 19:09:25 +0200
changeset 47871 aae7ff3ffc789ab35d1d88b8e8d63a26fb1bf9a0
parent 47870 83550fdf1b23182330f5115bc62e8f8ad49e9e9b
child 47872 358360ecb8065087ac83d45c7aecfc65dbba813a
push id14456
push userdgottwald@mozilla.com
push dateSun, 18 Jul 2010 08:27:01 +0000
treeherdermozilla-central@358360ecb806 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs569680
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 569680 - Move the platform specific geolocation files. r=dougt
dom/interfaces/geolocation/Makefile.in
dom/interfaces/geolocation/nsIGeolocationPrompt.idl
dom/interfaces/geolocation/nsIGeolocationProvider.idl
dom/src/geolocation/AndroidLocationProvider.cpp
dom/src/geolocation/AndroidLocationProvider.h
dom/src/geolocation/GPSDGeolocationProvider.js
dom/src/geolocation/GPSDGeolocationProvider.manifest
dom/src/geolocation/MaemoLocationProvider.cpp
dom/src/geolocation/MaemoLocationProvider.h
dom/src/geolocation/Makefile.in
dom/src/geolocation/NetworkGeolocationProvider.js
dom/src/geolocation/NetworkGeolocationProvider.manifest
dom/src/geolocation/WinMobileLocationProvider.cpp
dom/src/geolocation/WinMobileLocationProvider.h
dom/src/geolocation/nsGeolocation.h
dom/src/geolocation/nsGeolocationOOP.h
dom/system/GPSDGeolocationProvider.js
dom/system/GPSDGeolocationProvider.manifest
dom/system/Makefile.in
dom/system/NetworkGeolocationProvider.js
dom/system/NetworkGeolocationProvider.manifest
dom/system/android/AndroidLocationProvider.cpp
dom/system/android/AndroidLocationProvider.h
dom/system/android/Makefile.in
dom/system/unix/MaemoLocationProvider.cpp
dom/system/unix/MaemoLocationProvider.h
dom/system/unix/Makefile.in
dom/system/windows/Makefile.in
dom/system/windows/WinMobileLocationProvider.cpp
dom/system/windows/WinMobileLocationProvider.h
xpcom/system/Makefile.in
xpcom/system/nsIGeolocationProvider.idl
--- a/dom/interfaces/geolocation/Makefile.in
+++ b/dom/interfaces/geolocation/Makefile.in
@@ -51,12 +51,12 @@ XPIDLSRCS =                             
             nsIDOMGeoPosition.idl              \
             nsIDOMGeoPositionAddress.idl       \
             nsIDOMGeoPositionCoords.idl        \
             nsIDOMGeoPositionCallback.idl      \
             nsIDOMGeoPositionError.idl         \
             nsIDOMGeoPositionErrorCallback.idl \
             nsIDOMGeoPositionOptions.idl       \
             nsIDOMNavigatorGeolocation.idl     \
-            nsIGeolocationProvider.idl         \
+            nsIGeolocationPrompt.idl           \
             $(NULL)
 
 include $(topsrcdir)/config/rules.mk
rename from dom/interfaces/geolocation/nsIGeolocationProvider.idl
rename to dom/interfaces/geolocation/nsIGeolocationPrompt.idl
--- a/dom/interfaces/geolocation/nsIGeolocationProvider.idl
+++ b/dom/interfaces/geolocation/nsIGeolocationPrompt.idl
@@ -68,65 +68,15 @@ interface nsIGeolocationRequest : nsISup
 [scriptable, function, uuid(2300C895-1BEE-4297-912C-A57082F3E936)]
 interface nsIGeolocationPrompt : nsISupports {
   /**
    * Called when a request has been made to access geolocation data
    */
   void prompt(in nsIGeolocationRequest request);
 };
 
-/** 
- * Interface provides a way for a geolocation provider to
- * notify the system that a new location is available.
- */
-[scriptable, uuid(B89D7227-9F04-4236-A582-25A3F2779D72)]
-interface nsIGeolocationUpdate : nsISupports {
-
-  /**
-   * Notify the geolocation service that a new geolocation
-   * has been discovered.
-   * This must be called on the main thread
-   */
-  void update(in nsIDOMGeoPosition position);
-};
-
-
-/**
- * Interface provides location information to the nsGeolocator
- * via the nsIDOMGeolocationCallback interface.  After
- * startup is called, any geo location change should call
- * callback.update().
- */
-[scriptable, uuid(701413ED-0F51-64F7-71C7-4369D8E07D6E)]
-interface nsIGeolocationProvider : nsISupports {
-
-  /**
-   * Start up the provider.  This is called before any other
-   * method.  may be called multiple times.
-   */
-  void startup();
-
-  /**
-   * watch
-   * When a location change is observed, notify the callback
-   */
-  void watch(in nsIGeolocationUpdate callback);
-
-  /**
-   * shutdown
-   * Shuts down the location device.
-   */
-  void shutdown();
-};
-
 %{C++
 /*  
-    This must be implemented by geolocation providers.  It
-    must support nsIGeolocationProvider.
-*/
-#define NS_GEOLOCATION_PROVIDER_CONTRACTID "@mozilla.org/geolocation/provider;1"
-
-/*  
     This must be implemented by embedders.  It must support
     nsIGeolocationPrompt.
 */
 #define NS_GEOLOCATION_PROMPT_CONTRACTID   "@mozilla.org/geolocation/prompt;1"
 %}
--- a/dom/src/geolocation/Makefile.in
+++ b/dom/src/geolocation/Makefile.in
@@ -60,34 +60,32 @@ EXTRA_DSO_LDOPTS = \
 LOCAL_INCLUDES = \
 		-I$(topsrcdir)/dom/base \
 		-I$(topsrcdir)/dom/ipc \
 		-I$(topsrcdir)/content/base/src \
 		-I$(topsrcdir)/content/events/src \
 		$(NULL)
 
 ifdef WINCE_WINDOWS_MOBILE
-CPPSRCS         += WinMobileLocationProvider.cpp nsGeoPosition.cpp
+CPPSRCS         += nsGeoPosition.cpp
+LOCAL_INCLUDES  += -I$(topsrcdir)/dom/system/windows \
+                   $(NULL)
 endif
 
 ifdef MOZ_MAEMO_LIBLOCATION
-CPPSRCS         += MaemoLocationProvider.cpp nsGeoPosition.cpp
-LOCAL_INCLUDES	+= $(MOZ_PLATFORM_MAEMO_CFLAGS)
+CPPSRCS         += nsGeoPosition.cpp
+LOCAL_INCLUDES  += $(MOZ_PLATFORM_MAEMO_CFLAGS) \
+                   -I$(topsrcdir)/dom/system/unix \
+                   $(NULL)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
-CPPSRCS         += AndroidLocationProvider.cpp nsGeoPosition.cpp
+CPPSRCS         += nsGeoPosition.cpp
 EXPORTS         += nsGeoPosition.h
+LOCAL_INCLUDES  += -I$(topsrcdir)/dom/system/android \
+                   $(NULL)
 endif
 
-EXTRA_COMPONENTS = \
-                 NetworkGeolocationProvider.js \
-                 NetworkGeolocationProvider.manifest \
-                 GPSDGeolocationProvider.js \
-                 GPSDGeolocationProvider.manifest \
-                 $(NULL)
-
-
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/dom/src/geolocation/nsGeolocation.h
+++ b/dom/src/geolocation/nsGeolocation.h
@@ -60,16 +60,17 @@
 #include "nsIDOMGeoPositionCallback.h"
 #include "nsIDOMGeoPositionErrorCallback.h"
 #include "nsIDOMGeoPositionOptions.h"
 #include "nsIDOMNavigatorGeolocation.h"
 
 #include "nsPIDOMWindow.h"
 
 #include "nsIGeolocationProvider.h"
+#include "nsIGeolocationPrompt.h"
 
 class nsGeolocationService;
 class nsGeolocation;
 
 class nsGeolocationRequest
  : public nsIGeolocationRequest
  , public nsITimerCallback
 #ifdef MOZ_IPC
--- a/dom/src/geolocation/nsGeolocationOOP.h
+++ b/dom/src/geolocation/nsGeolocationOOP.h
@@ -36,16 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsGeolocationOOP_h
 #define nsGeolocationOOP_h
 
 #include "base/basictypes.h"
 
 #include "nsIGeolocationProvider.h"
+#include "nsIGeolocationPrompt.h"
 #include "nsString.h"
 #include "nsIDOMElement.h"
 
 #include "mozilla/dom/PGeolocationRequestParent.h"
 
 class nsGeolocationRequestProxy;
 
 namespace mozilla {
rename from dom/src/geolocation/GPSDGeolocationProvider.js
rename to dom/system/GPSDGeolocationProvider.js
rename from dom/src/geolocation/GPSDGeolocationProvider.manifest
rename to dom/system/GPSDGeolocationProvider.manifest
--- a/dom/system/Makefile.in
+++ b/dom/system/Makefile.in
@@ -60,16 +60,23 @@ endif
 ifneq (,$(filter android,$(MOZ_WIDGET_TOOLKIT)))
 DIRS = android
 endif
 
 CPPSRCS     = \
     nsAccelerometer.cpp \
     $(NULL)
 
+EXTRA_COMPONENTS = \
+                 NetworkGeolocationProvider.js \
+                 NetworkGeolocationProvider.manifest \
+                 GPSDGeolocationProvider.js \
+                 GPSDGeolocationProvider.manifest \
+                 $(NULL)
+
 EXPORTS     = \
     nsAccelerometer.h \
     $(NULL)
 
 include $(topsrcdir)/config/config.mk
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 LIBXUL_LIBRARY   = 1
rename from dom/src/geolocation/NetworkGeolocationProvider.js
rename to dom/system/NetworkGeolocationProvider.js
rename from dom/src/geolocation/NetworkGeolocationProvider.manifest
rename to dom/system/NetworkGeolocationProvider.manifest
rename from dom/src/geolocation/AndroidLocationProvider.cpp
rename to dom/system/android/AndroidLocationProvider.cpp
rename from dom/src/geolocation/AndroidLocationProvider.h
rename to dom/system/android/AndroidLocationProvider.h
--- a/dom/system/android/Makefile.in
+++ b/dom/system/android/Makefile.in
@@ -48,12 +48,16 @@ LIBRARY_NAME    = domsystemandroid_s
 LIBXUL_LIBRARY   = 1
 FORCE_STATIC_LIB = 1
 EXPORT_LIBRARY = 1
 
 include $(topsrcdir)/config/config.mk
 
 CPPSRCS     = \
         nsAccelerometerSystem.cpp \
+        AndroidLocationProvider.cpp \
         $(NULL)
 
+        LOCAL_INCLUDES  += -I$(topsrcdir)/dom/src/geolocation \
+                           $(NULL)
+
 include $(topsrcdir)/config/rules.mk
 
rename from dom/src/geolocation/MaemoLocationProvider.cpp
rename to dom/system/unix/MaemoLocationProvider.cpp
rename from dom/src/geolocation/MaemoLocationProvider.h
rename to dom/system/unix/MaemoLocationProvider.h
--- a/dom/system/unix/Makefile.in
+++ b/dom/system/unix/Makefile.in
@@ -50,9 +50,16 @@ FORCE_STATIC_LIB = 1
 EXPORT_LIBRARY = 1
 
 include $(topsrcdir)/config/config.mk
 
 CPPSRCS     = \
         nsAccelerometerSystem.cpp \
         $(NULL)
 
+ifdef MOZ_MAEMO_LIBLOCATION
+        CPPSRCS         += MaemoLocationProvider.cpp
+        LOCAL_INCLUDES  += $(MOZ_PLATFORM_MAEMO_CFLAGS) \
+                           -I$(topsrcdir)/dom/src/geolocation \
+                           $(NULL)
+endif
+
 include $(topsrcdir)/config/rules.mk
\ No newline at end of file
--- a/dom/system/windows/Makefile.in
+++ b/dom/system/windows/Makefile.in
@@ -50,9 +50,16 @@ FORCE_STATIC_LIB = 1
 EXPORT_LIBRARY = 1
 
 include $(topsrcdir)/config/config.mk
 
 CPPSRCS     = \
         nsAccelerometerSystem.cpp \
         $(NULL)
 
+ifdef WINCE_WINDOWS_MOBILE
+CPPSRCS         += WinMobileLocationProvider.cpp 
+
+LOCAL_INCLUDES  += -I$(topsrcdir)/dom/src/geolocation \
+                   $(NULL)
+endif
+
 include $(topsrcdir)/config/rules.mk
rename from dom/src/geolocation/WinMobileLocationProvider.cpp
rename to dom/system/windows/WinMobileLocationProvider.cpp
rename from dom/src/geolocation/WinMobileLocationProvider.h
rename to dom/system/windows/WinMobileLocationProvider.h
--- a/xpcom/system/Makefile.in
+++ b/xpcom/system/Makefile.in
@@ -48,15 +48,16 @@ XPIDL_MODULE    = xpcom_system
 XPIDLSRCS = \
         nsIXULAppInfo.idl \
         nsIXULRuntime.idl \
         nsIGConfService.idl \
         nsIGnomeVFSService.idl \
         nsIBlocklistService.idl \
         nsIGIOService.idl \
         nsIAccelerometer.idl \
+        nsIGeolocationProvider.idl \
         $(NULL)
 
 ifdef MOZ_CRASHREPORTER
 XPIDLSRCS += nsICrashReporter.idl
 endif
 
 include $(topsrcdir)/config/rules.mk
copy from dom/interfaces/geolocation/nsIGeolocationProvider.idl
copy to xpcom/system/nsIGeolocationProvider.idl
--- a/dom/interfaces/geolocation/nsIGeolocationProvider.idl
+++ b/xpcom/system/nsIGeolocationProvider.idl
@@ -40,45 +40,17 @@
 
 interface nsIURI;
 interface nsIDOMWindow;
 interface nsIDOMElement;
 interface nsIDOMGeoPosition;
 interface nsIGeolocationPrompt;
 
 /**
- * Interface allows access to a geolocation and is passed to
- * the nsIGeolocationPrompt so that the application can approve
- * or deny the request.
- */
-[scriptable, function, uuid(F2AEFDE1-8E38-48B3-BBB8-BD6C4AE1AC8A)]
-interface nsIGeolocationRequest : nsISupports {
 
-  readonly attribute nsIURI requestingURI;
-  readonly attribute nsIDOMWindow requestingWindow;
-
-  readonly attribute nsIDOMElement requestingElement;
-
-  void cancel();
-  void allow();
-};
-
-/**
- * Interface provides a way for the application to handle
- * the UI prompts associated with geo position.
- */
-[scriptable, function, uuid(2300C895-1BEE-4297-912C-A57082F3E936)]
-interface nsIGeolocationPrompt : nsISupports {
-  /**
-   * Called when a request has been made to access geolocation data
-   */
-  void prompt(in nsIGeolocationRequest request);
-};
-
-/** 
  * Interface provides a way for a geolocation provider to
  * notify the system that a new location is available.
  */
 [scriptable, uuid(B89D7227-9F04-4236-A582-25A3F2779D72)]
 interface nsIGeolocationUpdate : nsISupports {
 
   /**
    * Notify the geolocation service that a new geolocation
@@ -118,15 +90,9 @@ interface nsIGeolocationProvider : nsISu
 };
 
 %{C++
 /*  
     This must be implemented by geolocation providers.  It
     must support nsIGeolocationProvider.
 */
 #define NS_GEOLOCATION_PROVIDER_CONTRACTID "@mozilla.org/geolocation/provider;1"
-
-/*  
-    This must be implemented by embedders.  It must support
-    nsIGeolocationPrompt.
-*/
-#define NS_GEOLOCATION_PROMPT_CONTRACTID   "@mozilla.org/geolocation/prompt;1"
 %}