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

Delta Between Two Patch Sets: include/AdblockPlus/JsEngine.h

Issue 10727002: Get rid of dependencies on v8.h in public header files (Closed)
Left Patch Set: Created May 23, 2013, 2:43 p.m.
Right Patch Set: Added helper class to make using v8 values via auto_ptr less awkward Created May 23, 2013, 4:08 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 | « no previous file | include/AdblockPlus/JsValue.h » ('j') | include/AdblockPlus/JsValue.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 12 matching lines...) Expand all
23 #include <stdint.h> 23 #include <stdint.h>
24 #include <string> 24 #include <string>
25 #include <AdblockPlus/AppInfo.h> 25 #include <AdblockPlus/AppInfo.h>
26 #include <AdblockPlus/tr1_functional.h> 26 #include <AdblockPlus/tr1_functional.h>
27 #include <AdblockPlus/LogSystem.h> 27 #include <AdblockPlus/LogSystem.h>
28 #include <AdblockPlus/FileSystem.h> 28 #include <AdblockPlus/FileSystem.h>
29 #include <AdblockPlus/JsValue.h> 29 #include <AdblockPlus/JsValue.h>
30 #include <AdblockPlus/WebRequest.h> 30 #include <AdblockPlus/WebRequest.h>
31 31
32 #include "tr1_memory.h" 32 #include "tr1_memory.h"
33 #include "V8ValueHolder.h"
33 34
34 namespace v8 35 namespace v8
35 { 36 {
36 class Arguments; 37 class Arguments;
37 class Isolate; 38 class Isolate;
38 class Context; 39 class Context;
39 template <class T> class Handle; 40 template <class T> class Handle;
Felix Dahlke 2013/05/24 15:45:41 I thought we agreed on "template<class T>" (no spa
40 template <class T> class Persistent; 41 template <class T> class Persistent;
41 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); 42 typedef Handle<Value>(*InvocationCallback)(const Arguments &args);
42 } 43 }
43 44
44 namespace AdblockPlus 45 namespace AdblockPlus
45 { 46 {
46 class JsEngine; 47 class JsEngine;
47 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr; 48 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr;
48 49
49 class JsEngine : public std::tr1::enable_shared_from_this<JsEngine> 50 class JsEngine : public std::tr1::enable_shared_from_this<JsEngine>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 LogSystemPtr GetLogSystem(); 92 LogSystemPtr GetLogSystem();
92 void SetLogSystem(LogSystemPtr val); 93 void SetLogSystem(LogSystemPtr val);
93 94
94 private: 95 private:
95 JsEngine(); 96 JsEngine();
96 97
97 FileSystemPtr fileSystem; 98 FileSystemPtr fileSystem;
98 WebRequestPtr webRequest; 99 WebRequestPtr webRequest;
99 LogSystemPtr logSystem; 100 LogSystemPtr logSystem;
100 v8::Isolate* isolate; 101 v8::Isolate* isolate;
101 std::auto_ptr<v8::Persistent<v8::Context> > context; 102 V8ValueHolder<v8::Context> context;
102 EventMap eventCallbacks; 103 EventMap eventCallbacks;
103 }; 104 };
104 } 105 }
105 106
106 #endif 107 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld