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

Unified Diff: src/Notification.cpp

Issue 29337850: Issue 3724 - Add JsValue::Call(const JsValue&) (Closed)
Patch Set: typo fix Created March 3, 2016, 11:20 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 | « src/JsValue.cpp ('k') | test/JsValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Notification.cpp
diff --git a/src/Notification.cpp b/src/Notification.cpp
index 89bd10e144379a7fa3503cb0fd57ca352c07eb89..0b1b2f7d6c79083438dd663b0d24a71f75f35edc 100644
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -67,11 +67,9 @@ NotificationType Notification::GetType() const
return StringToNotificationType(GetProperty("type")->AsString());
}
-NotificationTexts Notification::GetTexts()
+NotificationTexts Notification::GetTexts() const
{
- JsValueList params;
- params.push_back(shared_from_this());
- JsValuePtr jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(params);
+ JsValuePtr jsTexts = jsEngine->Evaluate("API.getNotificationTexts")->Call(*this);
NotificationTexts notificationTexts;
JsValuePtr jsTitle = jsTexts->GetProperty("title");
if (jsTitle->IsString())
@@ -105,7 +103,5 @@ std::vector<std::string> Notification::GetLinks() const
void Notification::MarkAsShown()
{
- JsValueList params;
- params.push_back(GetProperty("id"));
- jsEngine->Evaluate("API.markNotificationAsShown")->Call(params);
+ jsEngine->Evaluate("API.markNotificationAsShown")->Call(*GetProperty("id"));
}
« no previous file with comments | « src/JsValue.cpp ('k') | test/JsValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld