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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/TabBase.java

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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: chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java b/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
index 75cfa085d154f91f69e4b9c11caafa06664d97e2..c7e737845c35c61b4a290d932ec5c116b69b8c36 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
@@ -43,7 +43,7 @@ public abstract class TabBase implements NavigationClient {
/** Used for automatically generating tab ids. */
private static final AtomicInteger sIdCounter = new AtomicInteger();
- private int mNativeTabAndroid;
+ private long mNativeTabAndroid;
/** Unique id of this tab (within its container). */
private final int mId;
@@ -542,7 +542,7 @@ public abstract class TabBase implements NavigationClient {
*
* @param nativeWebContents The native web contents pointer.
*/
- protected void initContentView(int nativeWebContents) {
+ protected void initContentView(long nativeWebContents) {
NativePage previousNativePage = mNativePage;
mNativePage = null;
destroyNativePageInternal(previousNativePage);
@@ -688,13 +688,13 @@ public abstract class TabBase implements NavigationClient {
* @return The native pointer representing the native side of this {@link TabBase} object.
*/
@CalledByNative
- protected int getNativePtr() {
+ protected long getNativePtr() {
return mNativeTabAndroid;
}
/** This is currently called when committing a pre-rendered page. */
@CalledByNative
- private void swapWebContents(final int newWebContents) {
+ private void swapWebContents(final long newWebContents) {
destroyContentView(false);
NativePage previousNativePage = mNativePage;
mNativePage = null;
@@ -712,13 +712,13 @@ public abstract class TabBase implements NavigationClient {
}
@CalledByNative
- private void setNativePtr(int nativePtr) {
+ private void setNativePtr(long nativePtr) {
assert mNativeTabAndroid == 0;
mNativeTabAndroid = nativePtr;
}
@CalledByNative
- private int getNativeInfoBarContainer() {
+ private long getNativeInfoBarContainer() {
return getInfoBarContainer().getNative();
}
@@ -764,11 +764,11 @@ public abstract class TabBase implements NavigationClient {
sIdCounter.addAndGet(diff);
}
- private native void nativeInitWebContents(int nativeTabAndroid, boolean incognito,
+ private native void nativeInitWebContents(long nativeTabAndroid, boolean incognito,
ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid delegate);
- private native void nativeDestroyWebContents(int nativeTabAndroid, boolean deleteNative);
- private native Profile nativeGetProfileAndroid(int nativeTabAndroid);
- private native int nativeGetSecurityLevel(int nativeTabAndroid);
- private native void nativeSetActiveNavigationEntryTitleForUrl(int nativeTabAndroid, String url,
+ private native void nativeDestroyWebContents(long nativeTabAndroid, boolean deleteNative);
+ private native Profile nativeGetProfileAndroid(long nativeTabAndroid);
+ private native int nativeGetSecurityLevel(long nativeTabAndroid);
+ private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url,
String title);
}

Powered by Google App Engine
This is Rietveld 408576698