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

Unified Diff: lib/api.js

Issue 5797488346791936: Issue 1107 - Support notifications (Closed)
Patch Set: simplify the expression Created Jan. 22, 2015, 7:54 p.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 | « include/AdblockPlus/Notification.h ('k') | lib/prefs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/api.js
diff --git a/lib/api.js b/lib/api.js
index b294274d51ce5053485fa0eddd109e51d50cb802..03f135cd69a00513cd86162b0e4d521e83083814 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -26,6 +26,7 @@ var API = (function()
var Synchronizer = require("synchronizer").Synchronizer;
var Prefs = require("prefs").Prefs;
var checkForUpdates = require("updater").checkForUpdates;
+ var Notification = require("notification").Notification;
return {
getFilterFromText: function(text)
@@ -136,6 +137,20 @@ var API = (function()
return result;
},
+ getNextNotificationToShow: function(url)
+ {
+ return Notification.getNextToShow(url);
+ },
+
+ getNotificationTexts: function(notification)
+ {
+ return Notification.getLocalizedTexts(notification);
+ },
+
+ markNotificationAsShown: function(id)
+ {
+ Notification.markAsShown(id);
+ },
checkFilterMatch: function(url, contentType, documentUrl)
{
var requestHost = extractHostFromURL(url);
« no previous file with comments | « include/AdblockPlus/Notification.h ('k') | lib/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld