OLD | NEW |
(Empty) | |
| 1 #include <AdblockPlus/AppInfo.h> |
| 2 |
| 3 #include "AppInfoJsObject.h" |
| 4 |
| 5 using namespace AdblockPlus; |
| 6 |
| 7 v8::Handle<v8::ObjectTemplate> AppInfoJsObject::Create(const AppInfo& appInfo) |
| 8 { |
| 9 v8::HandleScope handleScope; |
| 10 const v8::Handle<v8::ObjectTemplate> infoObject = v8::ObjectTemplate::New(); |
| 11 infoObject->Set(v8::String::New("addonID"), |
| 12 v8::String::New(appInfo.addonId.c_str())); |
| 13 infoObject->Set(v8::String::New("addonVersion"), |
| 14 v8::String::New(appInfo.addonVersion.c_str())); |
| 15 infoObject->Set(v8::String::New("addonRoot"), |
| 16 v8::String::New(appInfo.addonRoot.c_str())); |
| 17 infoObject->Set(v8::String::New("addonName"), |
| 18 v8::String::New(appInfo.addonName.c_str())); |
| 19 infoObject->Set(v8::String::New("application"), |
| 20 v8::String::New(appInfo.application.c_str())); |
| 21 return handleScope.Close(infoObject); |
| 22 } |
OLD | NEW |