Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 032f5a8

Browse files
committed
Bug 822712 - SimplePush - Implementation. r=dougt, jst, jlebar
1 parent e79cec0 commit 032f5a8

19 files changed

Lines changed: 1366 additions & 0 deletions

File tree

b2g/app/b2g.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,17 @@ pref("dom.mozContacts.enabled", true);
388388
// WebAlarms
389389
pref("dom.mozAlarms.enabled", true);
390390

391+
// SimplePush
392+
// serverURL to be assigned by services team
393+
pref("services.push.serverURL", "");
394+
pref("services.push.userAgentID", "");
395+
// exponential back-off start is 5 seconds like in HTTP/1.1
396+
pref("services.push.retryBaseInterval", 5000);
397+
// exponential back-off end is 20 minutes
398+
pref("services.push.maxRetryInterval", 1200000);
399+
// How long before a DOMRequest errors as timeout
400+
pref("services.push.requestTimeout", 10000);
401+
391402
// NetworkStats
392403
#ifdef MOZ_B2G_RIL
393404
pref("dom.mozNetworkStats.enabled", true);

b2g/installer/package-manifest.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
@BINPATH@/components/dom_indexeddb.xpt
195195
@BINPATH@/components/dom_offline.xpt
196196
@BINPATH@/components/dom_payment.xpt
197+
@BINPATH@/components/dom_push.xpt
197198
@BINPATH@/components/dom_json.xpt
198199
#ifdef MOZ_B2G_RIL
199200
@BINPATH@/components/dom_mms.xpt
@@ -505,6 +506,10 @@
505506
@BINPATH@/components/Webapps.manifest
506507
@BINPATH@/components/AppsService.js
507508
@BINPATH@/components/AppsService.manifest
509+
@BINPATH@/components/Push.js
510+
@BINPATH@/components/Push.manifest
511+
@BINPATH@/components/PushService.js
512+
@BINPATH@/components/PushService.manifest
508513

509514
@BINPATH@/components/nsDOMIdentity.js
510515
@BINPATH@/components/nsIDService.js

browser/installer/package-manifest.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
@BINPATH@/components/dom_indexeddb.xpt
198198
@BINPATH@/components/dom_offline.xpt
199199
@BINPATH@/components/dom_json.xpt
200+
@BINPATH@/components/dom_push.xpt
200201
#ifdef MOZ_B2G_RIL
201202
@BINPATH@/components/dom_mms.xpt
202203
#endif
@@ -504,6 +505,10 @@
504505
@BINPATH@/components/Webapps.manifest
505506
@BINPATH@/components/AppsService.js
506507
@BINPATH@/components/AppsService.manifest
508+
@BINPATH@/components/Push.js
509+
@BINPATH@/components/Push.manifest
510+
@BINPATH@/components/PushService.js
511+
@BINPATH@/components/PushService.manifest
507512
@BINPATH@/components/nsDOMIdentity.js
508513
@BINPATH@/components/nsIDService.js
509514
@BINPATH@/components/Identity.manifest

browser/installer/removed-files.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,7 @@ xpicleanup@BIN_SUFFIX@
12221222
components/dom_json.xpt
12231223
components/dom_loadsave.xpt
12241224
components/dom_offline.xpt
1225+
components/dom_push.xpt
12251226
components/dom_range.xpt
12261227
components/dom_sidebar.xpt
12271228
components/dom_smil.xpt

dom/apps/src/PermissionsTable.jsm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ this.PermissionsTable = { geolocation: {
124124
privileged: DENY_ACTION,
125125
certified: ALLOW_ACTION
126126
},
127+
push: {
128+
app: ALLOW_ACTION,
129+
privileged: ALLOW_ACTION,
130+
certified: ALLOW_ACTION
131+
},
127132
settings: {
128133
app: DENY_ACTION,
129134
privileged: DENY_ACTION,

dom/dom-config.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DOM_SRCDIRS = \
88
dom/encoding \
99
dom/file \
1010
dom/power \
11+
dom/push \
1112
dom/quota \
1213
dom/media \
1314
dom/network/src \

dom/messages/SystemMessagePermissionsChecker.jsm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ this.SystemMessagePermissionsTable = {
7474
"notification": {
7575
"desktop-notification": []
7676
},
77+
"push": {
78+
"push": []
79+
},
80+
"push-register": {
81+
"push": []
82+
},
7783
"sms-received": {
7884
"sms": []
7985
},

dom/moz.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ interfaces = [
2626
'geolocation',
2727
'notification',
2828
'permission',
29+
'push',
2930
'svg',
3031
'smil',
3132
'apps',
@@ -51,6 +52,7 @@ PARALLEL_DIRS += [
5152
'media',
5253
'messages',
5354
'power',
55+
'push',
5456
'quota',
5557
'settings',
5658
'mobilemessage',

dom/push/Makefile.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
# You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
DEPTH = @DEPTH@
6+
topsrcdir = @top_srcdir@
7+
srcdir = @srcdir@
8+
VPATH = @srcdir@
9+
10+
relativesrcdir = @relativesrcdir@
11+
12+
include $(DEPTH)/config/autoconf.mk
13+
14+
include $(topsrcdir)/config/rules.mk

dom/push/moz.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# vim: set filetype=python:
2+
# This Source Code Form is subject to the terms of the Mozilla Public
3+
# License, v. 2.0. If a copy of the MPL was not distributed with this
4+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5+
6+
PARALLEL_DIRS += ['src']

0 commit comments

Comments
 (0)