Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java

Issue 589113002: Rename java WebContentsObserverAndroid to WebContentsObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes incorporated Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java b/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
index 6237141ef2208402a763b2515d4c268122c93d5e..5880d3de43ad095eac9b81a7ba36079493a29c6b 100644
--- a/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
+++ b/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
@@ -6,20 +6,23 @@ package org.chromium.content.browser;
import org.chromium.base.CalledByNative;
nyquist 2014/09/25 16:57:28 remove this and JNINamespace after you remove all
wajahat 2014/09/29 14:43:25 Done.
import org.chromium.base.JNINamespace;
-import org.chromium.base.ThreadUtils;
+import org.chromium.content.browser.WebContentsObserver;
nyquist 2014/09/25 16:57:28 They are in the same package, so this in unnecessa
wajahat 2014/09/29 14:43:24 Done.
import org.chromium.content_public.browser.WebContents;
/**
+ * @deprecated This class is renamed to WebContentsObserver
nyquist 2014/09/25 16:57:28 Could you use {@link WebContentsObserver}? Also, j
wajahat 2014/09/29 14:43:25 Done.
+ * in future this will be removed.
+ */
+@Deprecated
+/**
* This class receives callbacks that act as hooks for various a native web contents events related
* to loading a url. A single web contents can have multiple WebContentObserverAndroids.
*/
@JNINamespace("content")
nyquist 2014/09/25 16:57:28 This annotation should not be needed anymore.
wajahat 2014/09/29 14:43:25 Done.
-public abstract class WebContentsObserverAndroid {
- private long mNativeWebContentsObserverAndroid;
+public abstract class WebContentsObserverAndroid extends WebContentsObserver {
public WebContentsObserverAndroid(WebContents webContents) {
- ThreadUtils.assertOnUiThread();
- mNativeWebContentsObserverAndroid = nativeInit(webContents);
+ super(webContents);
}
@CalledByNative
nyquist 2014/09/25 16:57:28 I don't think these annotations are needed anymore
wajahat 2014/09/29 14:43:25 Done.
@@ -170,12 +173,5 @@ public abstract class WebContentsObserverAndroid {
*/
@CalledByNative
public void detachFromWebContents() {
- if (mNativeWebContentsObserverAndroid != 0) {
- nativeDestroy(mNativeWebContentsObserverAndroid);
- mNativeWebContentsObserverAndroid = 0;
- }
}
-
- private native long nativeInit(WebContents webContents);
- private native void nativeDestroy(long nativeWebContentsObserverAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698