Skip to content

Commit

Permalink
Bug 755245 - Implement System Message Handler : Part 1, IDL [sr=jonas…
Browse files Browse the repository at this point in the history
…,r=mounir,khuey]
  • Loading branch information
Fabrice Desré committed Jul 3, 2012
1 parent aaebfde commit 98fe91c
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/autoconf.mk.in
Expand Up @@ -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@
Expand Down
6 changes: 6 additions & 0 deletions configure.in
Expand Up @@ -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 ========================================================
Expand Down
1 change: 1 addition & 0 deletions dom/Makefile.in
Expand Up @@ -53,6 +53,7 @@ DIRS += \
devicestorage \
file \
media \
messages \
power \
settings \
sms \
Expand Down
16 changes: 16 additions & 0 deletions 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
20 changes: 20 additions & 0 deletions 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
19 changes: 19 additions & 0 deletions 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);
};
2 changes: 2 additions & 0 deletions toolkit/toolkit-makefiles.sh
Expand Up @@ -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
Expand Down

0 comments on commit 98fe91c

Please sign in to comment.