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

Delta Between Two Patch Sets: src/AppInfoJsObject.cpp

Issue 10198022: Pass application data into libadblockplus (Closed)
Left Patch Set: Created April 12, 2013, 1:23 p.m.
Right Patch Set: Merged upstream, addressed issues, renamed AppInfo fields Created April 17, 2013, 2:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/AppInfoJsObject.h ('k') | src/GlobalJsObject.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include <AdblockPlus/AppInfo.h> 1 #include <AdblockPlus/AppInfo.h>
2 2
3 #include "AppInfoJsObject.h" 3 #include "AppInfoJsObject.h"
4 4
5 using namespace AdblockPlus; 5 using namespace AdblockPlus;
6 6
7 v8::Handle<v8::ObjectTemplate> AppInfoJsObject::Create(const AppInfo& appInfo) 7 v8::Handle<v8::ObjectTemplate> AppInfoJsObject::Create(const AppInfo& appInfo)
8 { 8 {
9 v8::HandleScope handleScope; 9 v8::HandleScope handleScope;
10 const v8::Handle<v8::ObjectTemplate> infoObject = v8::ObjectTemplate::New(); 10 const v8::Handle<v8::ObjectTemplate> infoObject = v8::ObjectTemplate::New();
11 infoObject->Set(v8::String::New("addonID"), 11 infoObject->Set(v8::String::New("id"),
12 v8::String::New(appInfo.addonId.c_str())); 12 v8::String::New(appInfo.id.c_str()));
Wladimir Palant 2013/04/17 17:53:25 Utils::ToV8String()?
13 infoObject->Set(v8::String::New("addonVersion"), 13 infoObject->Set(v8::String::New("version"),
14 v8::String::New(appInfo.addonVersion.c_str())); 14 v8::String::New(appInfo.version.c_str()));
15 infoObject->Set(v8::String::New("addonRoot"), 15 infoObject->Set(v8::String::New("name"),
16 v8::String::New(appInfo.addonRoot.c_str())); 16 v8::String::New(appInfo.name.c_str()));
17 infoObject->Set(v8::String::New("addonName"), 17 infoObject->Set(v8::String::New("platform"),
18 v8::String::New(appInfo.addonName.c_str())); 18 v8::String::New(appInfo.platform.c_str()));
19 infoObject->Set(v8::String::New("application"),
20 v8::String::New(appInfo.application.c_str()));
21 return handleScope.Close(infoObject); 19 return handleScope.Close(infoObject);
22 } 20 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld