LEFT | RIGHT |
1 #include <vector> | 1 #include <vector> |
2 #include <stdexcept> | 2 #include <stdexcept> |
3 | 3 |
4 #include "GlobalJsObject.h" | 4 #include "GlobalJsObject.h" |
5 #include "ConsoleJsObject.h" | 5 #include "ConsoleJsObject.h" |
6 #include "WebRequestJsObject.h" | 6 #include "WebRequestJsObject.h" |
7 #include "Thread.h" | 7 #include "Thread.h" |
8 | 8 |
9 using namespace AdblockPlus; | 9 using namespace AdblockPlus; |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 v8::HandleScope handleScope; | 94 v8::HandleScope handleScope; |
95 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); | 95 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); |
96 const v8::Handle<v8::ObjectTemplate> console = | 96 const v8::Handle<v8::ObjectTemplate> console = |
97 AdblockPlus::ConsoleJsObject::Create(errorCallback); | 97 AdblockPlus::ConsoleJsObject::Create(errorCallback); |
98 global->Set(v8::String::New("console"), console); | 98 global->Set(v8::String::New("console"), console); |
99 const v8::Handle<v8::FunctionTemplate> setTimeoutFunction = | 99 const v8::Handle<v8::FunctionTemplate> setTimeoutFunction = |
100 v8::FunctionTemplate::New(SetTimeoutCallback); | 100 v8::FunctionTemplate::New(SetTimeoutCallback); |
101 global->Set(v8::String::New("setTimeout"), setTimeoutFunction); | 101 global->Set(v8::String::New("setTimeout"), setTimeoutFunction); |
102 const v8::Handle<v8::ObjectTemplate> request = | 102 const v8::Handle<v8::ObjectTemplate> request = |
103 AdblockPlus::WebRequestJsObject::Create(webRequest); | 103 AdblockPlus::WebRequestJsObject::Create(webRequest); |
104 global->Set(v8::String::New("_request"), request); | 104 global->Set(v8::String::New("_webRequest"), request); |
105 return handleScope.Close(global); | 105 return handleScope.Close(global); |
106 } | 106 } |
LEFT | RIGHT |