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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: Created July 11, 2014, 2:24 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
@@ -13,52 +13,52 @@
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ADBLOCK_PLUS_JS_ENGINE_H
#define ADBLOCK_PLUS_JS_ENGINE_H
+#include <functional>
#include <map>
+#include <memory>
#include <stdexcept>
#include <stdint.h>
#include <string>
#include <AdblockPlus/AppInfo.h>
-#include <AdblockPlus/tr1_functional.h>
#include <AdblockPlus/LogSystem.h>
#include <AdblockPlus/FileSystem.h>
#include <AdblockPlus/JsValue.h>
#include <AdblockPlus/WebRequest.h>
-#include "tr1_memory.h"
#include "V8ValueHolder.h"
namespace v8
{
class Arguments;
class Isolate;
class Value;
class Context;
template<class T> class Handle;
typedef Handle<Value>(*InvocationCallback)(const Arguments &args);
}
namespace AdblockPlus
{
class JsEngine;
- typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr;
+ typedef std::shared_ptr<JsEngine> JsEnginePtr;
- class JsEngine : public std::tr1::enable_shared_from_this<JsEngine>
+ class JsEngine : public std::enable_shared_from_this<JsEngine>
{
friend class JsValue;
friend class JsContext;
public:
- typedef std::tr1::function<void(JsValueList& params)> EventCallback;
+ typedef std::function<void(JsValueList& params)> EventCallback;
typedef std::map<std::string, EventCallback> EventMap;
static JsEnginePtr New(const AppInfo& appInfo = AppInfo());
void SetEventCallback(const std::string& eventName, EventCallback callback);
void RemoveEventCallback(const std::string& eventName);
void TriggerEvent(const std::string& eventName, JsValueList& params);
JsValuePtr Evaluate(const std::string& source,
const std::string& filename = "");

Powered by Google App Engine
This is Rietveld