diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 8713524d654..4bbd06e241a 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -273,6 +273,8 @@ MOZ_NATIVE_NSS = @MOZ_NATIVE_NSS@ MOZ_B2G_RIL = @MOZ_B2G_RIL@ MOZ_B2G_BT = @MOZ_B2G_BT@ +MOZ_SYS_MSG = @MOZ_SYS_MSG@ + MOZ_ASAN = @MOZ_ASAN@ MOZ_CFLAGS_NSS = @MOZ_CFLAGS_NSS@ MOZ_NO_WLZDEFS = @MOZ_NO_WLZDEFS@ diff --git a/configure.in b/configure.in index 9f53fd1280a..9015ca9e512 100644 --- a/configure.in +++ b/configure.in @@ -7437,6 +7437,12 @@ if test -n "$MOZ_B2G_BT"; then fi AC_SUBST(MOZ_B2G_BT) +dnl ======================================================== +dnl = Enable Support for System Messages API +dnl ======================================================== + +AC_SUBST(MOZ_SYS_MSG) + dnl ======================================================== dnl = Support for demangling undefined symbols dnl ======================================================== diff --git a/dom/Makefile.in b/dom/Makefile.in index e02a3a9c568..71301c6da29 100644 --- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -53,6 +53,7 @@ DIRS += \ devicestorage \ file \ media \ + messages \ power \ settings \ sms \ diff --git a/dom/messages/Makefile.in b/dom/messages/Makefile.in new file mode 100644 index 00000000000..8db72f676c1 --- /dev/null +++ b/dom/messages/Makefile.in @@ -0,0 +1,16 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +relativesrcdir = dom/messages + +include $(DEPTH)/config/autoconf.mk + +PARALLEL_DIRS = interfaces + +include $(topsrcdir)/config/rules.mk diff --git a/dom/messages/interfaces/Makefile.in b/dom/messages/interfaces/Makefile.in new file mode 100644 index 00000000000..e6c722f3257 --- /dev/null +++ b/dom/messages/interfaces/Makefile.in @@ -0,0 +1,20 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +XPIDL_MODULE = dom_messages + +include $(topsrcdir)/dom/dom-config.mk + +XPIDLSRCS = \ + nsIDOMNavigatorSystemMessages.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk diff --git a/dom/messages/interfaces/nsIDOMNavigatorSystemMessages.idl b/dom/messages/interfaces/nsIDOMNavigatorSystemMessages.idl new file mode 100644 index 00000000000..855cfb0c8c7 --- /dev/null +++ b/dom/messages/interfaces/nsIDOMNavigatorSystemMessages.idl @@ -0,0 +1,19 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "domstubs.idl" + +[scriptable, function, uuid(42692976-57fd-4bb4-ab95-2b97ebdc5056)] +interface nsIDOMSystemMessageCallback : nsISupports +{ + void handleMessage(in jsval message); +}; + +[scriptable, uuid(091e90dd-0e8b-463d-8cdc-9225d3a6ff90)] +interface nsIDOMNavigatorSystemMessages : nsISupports +{ + void mozSetMessageHandler(in DOMString type, in nsIDOMSystemMessageCallback callback); + + boolean mozHasPendingMessage(in DOMString type); +}; diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 0ed7d1929c0..599eb21d629 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -41,6 +41,8 @@ MAKEFILES_dom=" dom/indexedDB/Makefile dom/ipc/Makefile dom/locales/Makefile + dom/messages/Makefile + dom/messages/interfaces/Makefile dom/network/Makefile dom/network/interfaces/Makefile dom/network/src/Makefile