Implement Desktop Notifications in Fennec

RESOLVED FIXED

Status

defect
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
+++ This bug was initially created as a clone of Bug #573588 +++

I reviewed the WebNotification spec:
   http://dev.w3.org/2006/webapi/WebNotifications/publish/

and the google spec:
   http://code.google.com/p/gears/wiki/NotificationAPI


and I think both are a bit more complex than we need.


My current thinking is title, description, uri to image, and a callback for if/when the user clicks on the notification:

navigator.notification.notify("title",
                              "description",
			      "uri to image",
			      function() {})


-----

I cloned a firefox specific bug.  This is for Fennec specific work for Desktop Notifications
(Assignee)

Updated

9 years ago
Summary: Implement Desktop Notifications → Implement Desktop Notifications in Fennec
(Assignee)

Comment 1

9 years ago
Posted patch patch v.1Splinter Review
Assignee: nobody → doug.turner
Attachment #474343 - Flags: review?(mark.finkle)
(Assignee)

Comment 2

9 years ago
the image is just a copy of the geo prompt.

also, somewhat related - i do not see the icon for the prompt in the build even without my changes.
Comment on attachment 474343 [details] [diff] [review]
patch v.1

>diff --git a/components/ContentPermissionPrompt.js b/components/ContentPermissionPrompt.js

>+  prompt: function(request) {
>+    Services.console.logStringMessage("nsIContentPermissionPrompt prompt() called for request type " + request.type);

Remove the debug output
						     [request.uri.host], 1);
>+    let newBar = notificationBox.appendNotification(message,
>+						    request.type,
>+						    "chrome://browser/skin/images/" + request.type + "-16.png",

Notifications in Fennec do not display images, so just send "". The images take up too much valuable space.

NOTE: There are TABs in this file :(

>diff --git a/themes/core/images/desktop-notification-16.png b/themes/core/images/desktop-notification-16.png
>diff --git a/themes/core/images/geo-16.png b/themes/core/images/geolocation-16.png
>rename from themes/core/images/geo-16.png
>rename to themes/core/images/geolocation-16.png

Don't add any images

>diff --git a/themes/core/jar.mn b/themes/core/jar.mn

>-  skin/images/geo-16.png                    (images/geo-16.png)
>+  skin/images/geolocation-16.png            (images/geolocation-16.png)
>+  skin/images/desktop-notification-16.png   (images/desktop-notification-16.png)

Remove

r+ with the images and TABs removed
Attachment #474343 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 4

9 years ago
thanks.

http://hg.mozilla.org/mobile-browser/rev/2cf977860f46

E10s still need some support (bug 595456)
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.