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

Unified Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java

Issue 29678581: Issue 6000 - Rename "libadblockplus-android" (Closed)
Patch Set: addressed comments Created Jan. 29, 2018, 11:04 a.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: libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
deleted file mode 100644
index 331a7ac7dfb5f0ad91c2938ef154d43af0b9b3a8..0000000000000000000000000000000000000000
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-present eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package org.adblockplus.libadblockplus;
-
-import java.util.List;
-
-public final class JsEngine
-{
- protected final long ptr;
-
- static
- {
- System.loadLibrary("adblockplus-jni");
- registerNatives();
- }
-
- JsEngine(final long ptr)
- {
- this.ptr = ptr;
- }
-
- public void setEventCallback(final String eventName, final EventCallback callback)
- {
- setEventCallback(this.ptr, eventName, callback.ptr);
- }
-
- public void removeEventCallback(final String eventName)
- {
- removeEventCallback(this.ptr, eventName);
- }
-
- public JsValue evaluate(final String source, final String filename)
- {
- return evaluate(this.ptr, source, filename);
- }
-
- public JsValue evaluate(final String source)
- {
- return evaluate(this.ptr, source, "");
- }
-
- public void triggerEvent(final String eventName, final List<JsValue> params)
- {
- final long[] args = new long[params.size()];
-
- for (int i = 0; i < args.length; i++)
- {
- args[i] = params.get(i).ptr;
- }
-
- triggerEvent(this.ptr, eventName, args);
- }
-
- public void triggerEvent(final String eventName)
- {
- triggerEvent(this.ptr, eventName, null);
- }
-
- public JsValue newValue(final long value)
- {
- return newValue(this.ptr, value);
- }
-
- public JsValue newValue(final boolean value)
- {
- return newValue(this.ptr, value);
- }
-
- public JsValue newValue(final String value)
- {
- return newValue(this.ptr, value);
- }
-
- private final static native void registerNatives();
-
- private final static native void setEventCallback(long ptr, String eventName, long callback);
-
- private final static native void removeEventCallback(long ptr, String eventName);
-
- private final static native JsValue evaluate(long ptr, String source, String filename);
-
- private final static native void triggerEvent(long ptr, String eventName, long[] args);
-
- private final static native JsValue newValue(long ptr, long value);
-
- private final static native JsValue newValue(long ptr, boolean value);
-
- private final static native JsValue newValue(long ptr, String value);
-}

Powered by Google App Engine
This is Rietveld