Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: background.js

Issue 6098518317989888: Fix: Notification popup is broken (Closed)
Patch Set: Created Feb. 12, 2014, 9:39 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | metadata.chrome » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -299,7 +299,15 @@
if (activeNotification.severity === "critical"
&& typeof webkitNotifications !== "undefined")
{
- var notification = webkitNotifications.createHTMLNotification("notification.html");
+ if ("createHTMLNotification" in webkitNotifications)
+ notification = webkitNotifications.createHTMLNotification("notification.html");
+ else if ("createNotification" in webkitNotifications)
+ {
+ var texts = Notification.getLocalizedTexts(notification);
+ var title = texts.title ? texts.title : "";
+ var message = texts.message ? texts.message : "";
+ notification = webkitNotifications.createNotification("icons/abp-32.png", title, message);
+ }
notification.show();
notification.addEventListener("close", prepareNotificationIconAndPopup);
}
« no previous file with comments | « no previous file | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld