From b8261d49043da2c82d65967bcaa2b7fb300880a0 Mon Sep 17 00:00:00 2001 From: Steven Lee Date: Mon, 10 Sep 2012 07:14:00 -0400 Subject: [PATCH] Bug 714358: Time manager interface. f=mounir, sr=mounir --- dom/Makefile.in | 1 + dom/dom-config.mk | 1 + dom/interfaces/base/nsIDOMWindow.idl | 3 ++- dom/time/Makefile.in | 27 +++++++++++++++++++++++++++ dom/time/nsIDOMNavigatorTime.idl | 13 +++++++++++++ dom/time/nsIDOMTimeManager.idl | 12 ++++++++++++ toolkit/toolkit-makefiles.sh | 1 + 7 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 dom/time/Makefile.in create mode 100644 dom/time/nsIDOMNavigatorTime.idl create mode 100644 dom/time/nsIDOMTimeManager.idl diff --git a/dom/Makefile.in b/dom/Makefile.in index 76330d5f990b..97c705c8bfaf 100644 --- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -58,6 +58,7 @@ PARALLEL_DIRS += \ sms \ mms \ src \ + time \ locales \ network \ permission \ diff --git a/dom/dom-config.mk b/dom/dom-config.mk index ca9e20fcecc0..9b02f9472917 100644 --- a/dom/dom-config.mk +++ b/dom/dom-config.mk @@ -19,6 +19,7 @@ DOM_SRCDIRS = \ dom/src/geolocation \ dom/src/notification \ dom/workers \ + dom/time \ content/xbl/src \ content/xul/document/src \ content/events/src \ diff --git a/dom/interfaces/base/nsIDOMWindow.idl b/dom/interfaces/base/nsIDOMWindow.idl index ec8c9b9628ec..3620cafecd80 100644 --- a/dom/interfaces/base/nsIDOMWindow.idl +++ b/dom/interfaces/base/nsIDOMWindow.idl @@ -32,7 +32,7 @@ interface nsIDOMMozURLProperty : nsISupports * @see */ -[scriptable, uuid(afeb6529-06f1-47e8-98c6-c7bfadb4c1ff)] +[scriptable, uuid(AB4ED3B8-84F8-4585-B413-0996A7F96D20)] interface nsIDOMWindow : nsISupports { // the current browsing context @@ -497,6 +497,7 @@ interface nsIDOMWindow : nsISupports [implicit_jscontext] attribute jsval ondeviceproximity; [implicit_jscontext] attribute jsval onuserproximity; [implicit_jscontext] attribute jsval ondevicelight; + [implicit_jscontext] attribute jsval onmoztimechange; [implicit_jscontext] attribute jsval onmouseenter; [implicit_jscontext] attribute jsval onmouseleave; diff --git a/dom/time/Makefile.in b/dom/time/Makefile.in new file mode 100644 index 000000000000..0d037c447877 --- /dev/null +++ b/dom/time/Makefile.in @@ -0,0 +1,27 @@ +# 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 + +LIBRARY_NAME = dom_time_s +XPIDL_MODULE = dom_time +LIBXUL_LIBRARY = 1 +FORCE_STATIC_LIB = 1 + +include $(topsrcdir)/dom/dom-config.mk + +CPPSRCS = $(NULL) + +XPIDLSRCS = \ + nsIDOMNavigatorTime.idl \ + nsIDOMTimeManager.idl \ + $(NULL) + +include $(topsrcdir)/config/config.mk +include $(topsrcdir)/config/rules.mk diff --git a/dom/time/nsIDOMNavigatorTime.idl b/dom/time/nsIDOMNavigatorTime.idl new file mode 100644 index 000000000000..49942463ed8e --- /dev/null +++ b/dom/time/nsIDOMNavigatorTime.idl @@ -0,0 +1,13 @@ +/* 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 "nsISupports.idl" + +interface nsIDOMMozTimeManager; + +[scriptable, uuid(befc186d-c249-4acb-8e70-8080f7b45e5c)] +interface nsIDOMMozNavigatorTime : nsISupports +{ + readonly attribute nsIDOMMozTimeManager mozTime; +}; diff --git a/dom/time/nsIDOMTimeManager.idl b/dom/time/nsIDOMTimeManager.idl new file mode 100644 index 000000000000..e5d320675907 --- /dev/null +++ b/dom/time/nsIDOMTimeManager.idl @@ -0,0 +1,12 @@ +/* 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 "nsISupports.idl" + +[scriptable, builtinclass, uuid(d29beaaa-bd54-4fd5-9f18-e0eedb1dc96d)] +interface nsIDOMMozTimeManager : nsISupports +{ + // jsval could be Date object or UTC seconds + void set(in jsval time); +}; diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 2dc9e0ede971..aa1bf6abfe96 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -82,6 +82,7 @@ MAKEFILES_dom=" dom/src/storage/Makefile dom/system/Makefile dom/workers/Makefile + dom/time/Makefile " MAKEFILES_editor="