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

Unified Diff: chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java

Issue 108803002: Make TabBase non abstract (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 12 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: chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java
diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java
index 8dc4b28c2a1e40b2bb11e50b893356738de265fc..ff0329d410c2d68ff2a7762f5528ae2453ea21bf 100644
--- a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java
+++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java
@@ -8,13 +8,13 @@ import android.content.Context;
import android.text.TextUtils;
import org.chromium.chrome.browser.TabBase;
+import org.chromium.chrome.browser.UrlUtilities;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
import org.chromium.chrome.browser.infobar.AutoLoginProcessor;
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.LoadUrlParams;
-import org.chromium.content.common.CleanupReference;
import org.chromium.ui.base.WindowAndroid;
/**
@@ -22,10 +22,6 @@ import org.chromium.ui.base.WindowAndroid;
* and extends {@link TabBase}.
*/
public class TestShellTab extends TabBase {
- private long mNativeTestShellTab;
-
- private CleanupReference mCleanupReference;
-
// Tab state
private boolean mIsLoading;
@@ -44,24 +40,6 @@ public class TestShellTab extends TabBase {
loadUrlWithSanitization(url);
}
- @Override
- public void initialize() {
- super.initialize();
-
- mNativeTestShellTab = nativeInit();
- mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNativeTestShellTab));
- }
-
- @Override
- public void destroy() {
- super.destroy();
-
- if (mNativeTestShellTab != 0) {
- mCleanupReference.cleanupNow();
- mNativeTestShellTab = 0;
- }
- }
-
/**
* @return Whether or not the tab is currently loading.
*/
@@ -78,7 +56,7 @@ public class TestShellTab extends TabBase {
if (url == null) return;
// Sanitize the URL.
- url = nativeFixupUrl(mNativeTestShellTab, url);
+ url = UrlUtilities.fixupUrl(url);
// Invalid URLs will just return empty.
if (TextUtils.isEmpty(url)) return;
@@ -108,17 +86,6 @@ public class TestShellTab extends TabBase {
return new TestShellTabBaseChromeWebContentsDelegateAndroid();
}
- private static final class DestroyRunnable implements Runnable {
- private final long mNativeTestShellTab;
- private DestroyRunnable(long nativeTestShellTab) {
- mNativeTestShellTab = nativeTestShellTab;
- }
- @Override
- public void run() {
- nativeDestroy(mNativeTestShellTab);
- }
- }
-
@Override
protected AutoLoginProcessor createAutoLoginProcessor() {
return new AutoLoginProcessor() {
@@ -153,8 +120,4 @@ public class TestShellTab extends TabBase {
mIsLoading = false;
}
}
-
- private native long nativeInit();
- private static native void nativeDestroy(long nativeTestShellTab);
- private native String nativeFixupUrl(long nativeTestShellTab, String url);
}
« no previous file with comments | « chrome/android/testshell/chrome_main_delegate_testshell_android.cc ('k') | chrome/android/testshell/testshell_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698