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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 10259001: XMLHttpRequest API (Closed)
Patch Set: Created April 10, 2013, 3:19 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
Index: include/AdblockPlus/JsEngine.h
===================================================================
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -4,31 +4,33 @@
#include <stdexcept>
#include <string>
#include <v8.h>
namespace AdblockPlus
{
class ErrorCallback;
class FileReader;
+ class WebRequest;
class JsError : public std::runtime_error
{
public:
explicit JsError(const v8::Handle<v8::Value> exception,
const v8::Handle<v8::Message> message);
};
class JsEngine
{
public:
JsEngine(const FileReader* const fileReader,
+ WebRequest* const webRequest,
ErrorCallback* const errorCallback);
- void Evaluate(const char* source, const char* filename = NULL);
- void Evaluate(const std::string& source,
+ std::string Evaluate(const char* source, const char* filename = NULL);
+ std::string Evaluate(const std::string& source,
const std::string& filename = "");
void Load(const std::string& scriptPath);
std::string Call(const std::string& functionName);
std::string GetVariable(const std::string& name);
void Gc();
private:
const FileReader* const fileReader;

Powered by Google App Engine
This is Rietveld