Bug 767818 - Implement navigator.pay. Part 2 - Expose 'pay' function to 'navigator'; r=jst
authorFernando Jiménez <ferjmoreno@gmail.com>
Wed, 29 Aug 2012 18:41:34 -0300
changeset 107428 4f14d988d2fc927eaa9b4fb459792552a9c2d51c
parent 107427 fc63cbb13336802bfc294356d1a5cc067de5de67
child 107429 d0bd9c03e21ba456e839ea896389d47389194a36
push idunknown
push userunknown
push dateunknown
reviewersjst
bugs767818
milestone18.0a1
Bug 767818 - Implement navigator.pay. Part 2 - Expose 'pay' function to 'navigator'; r=jst
configure.in
dom/Makefile.in
dom/payment/Payment.manifest
toolkit/toolkit-makefiles.sh
--- a/configure.in
+++ b/configure.in
@@ -4194,16 +4194,17 @@ NECKO_PROTOCOLS_DEFAULT="about data file
 USE_ARM_KUSER=
 BUILD_CTYPES=1
 MOZ_USE_NATIVE_POPUP_WINDOWS=
 MOZ_ANDROID_HISTORY=
 MOZ_WEBSMS_BACKEND=
 MOZ_GRAPHITE=1
 ACCESSIBILITY=1
 MOZ_SYS_MSG=
+MOZ_PAY=
 
 case "$target_os" in
     mingw*)
         NS_ENABLE_TSF=1
         AC_DEFINE(NS_ENABLE_TSF)
         ;;
 esac
 
@@ -7308,16 +7309,24 @@ MOZ_ARG_ENABLE_BOOL(b2g-camera,
     MOZ_B2G_CAMERA=1,
     MOZ_B2G_CAMERA= )
 if test -n "$MOZ_B2G_CAMERA"; then
    AC_DEFINE(MOZ_B2G_CAMERA)
 fi
 AC_SUBST(MOZ_B2G_CAMERA)
 
 dnl ========================================================
+dnl = Enable Support for Payment API
+dnl ========================================================
+if test -n "$MOZ_PAY"; then
+    AC_DEFINE(MOZ_PAY)
+fi
+AC_SUBST(MOZ_PAY)
+
+dnl ========================================================
 dnl = Support for demangling undefined symbols
 dnl ========================================================
 if test -z "$SKIP_LIBRARY_CHECKS"; then
     AC_LANG_SAVE
     AC_LANG_CPLUSPLUS
     AC_CHECK_FUNCS(__cxa_demangle, HAVE_DEMANGLE=1, HAVE_DEMANGLE=)
     AC_LANG_RESTORE
 fi
--- a/dom/Makefile.in
+++ b/dom/Makefile.in
@@ -80,16 +80,22 @@ PARALLEL_DIRS += \
 endif
 
 ifdef MOZ_B2G_BT
 PARALLEL_DIRS += \
   bluetooth \
   $(NULL)
 endif
 
+ifdef MOZ_PAY
+PARALLEL_DIRS += \
+  payment \
+  $(NULL)
+endif
+
 # bindings/test is here, because it needs to build after bindings/, and
 # we build subdirectories before ourselves.
 TEST_DIRS += \
   tests \
   imptests \
   bindings/test \
   $(NULL)
 
new file mode 100644
--- /dev/null
+++ b/dom/payment/Payment.manifest
@@ -0,0 +1,3 @@
+component {a920adc0-c36e-4fd0-8de0-aac1ac6ebbd0} Payment.js
+contract @mozilla.org/payment/content-helper;1 {a920adc0-c36e-4fd0-8de0-aac1ac6ebbd0}
+category JavaScript-navigator-property mozPay @mozilla.org/payment/content-helper;1
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -1208,16 +1208,22 @@ fi
 if [ "$MOZ_B2G_RIL" ]; then
   add_makefiles "
     dom/telephony/Makefile
     dom/wifi/Makefile
     ipc/ril/Makefile
   "
 fi
 
+if [ "$MOZ_PAY" ]; then
+  add_makefiles "
+    dom/payment/Makefile
+  "
+fi
+
 if [ "$MOZ_CRASHREPORTER" ]; then
   add_makefiles "
     toolkit/crashreporter/Makefile
   "
   MAKEFILES_crashreporter_shared="
     toolkit/crashreporter/google-breakpad/src/client/Makefile
     toolkit/crashreporter/google-breakpad/src/common/Makefile
     toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile