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

Unified Diff: src/FilterEngine.cpp

Issue 5797488346791936: Issue 1107 - Support notifications (Closed)
Patch Set: fix comment Created Jan. 23, 2015, 3:56 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 | « libadblockplus.gyp ('k') | src/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/FilterEngine.cpp
diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp
index 3d4770dfe98ca93df67a5bbdcd97d3cf551996e0..96c4571fbf593f47041bd3415fc44d73f55da7f1 100644
--- a/src/FilterEngine.cpp
+++ b/src/FilterEngine.cpp
@@ -257,6 +257,17 @@ std::vector<SubscriptionPtr> FilterEngine::FetchAvailableSubscriptions() const
return result;
}
+NotificationPtr FilterEngine::GetNextNotificationToShow(const std::string& url)
+{
+ JsValuePtr func = jsEngine->Evaluate("API.getNextNotificationToShow");
+ JsValueList params;
+ if (!url.empty())
+ {
+ params.push_back(jsEngine->NewValue(url));
+ }
+ return Notification::JsValueToNotification(func->Call(params));
+}
+
AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url,
ContentType contentType,
const std::string& documentUrl) const
« no previous file with comments | « libadblockplus.gyp ('k') | src/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld