summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/PreloadController.java
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2011-07-08 17:27:38 +0100
committerMathew Inwood <mathewi@google.com>2011-07-14 11:40:04 +0100
commite1dbb956d762c3f07033f247c05270a9882a79a7 (patch)
tree9d22907dc6193e11628feef9dc56798e738f3a42 /src/com/android/browser/PreloadController.java
parent629b22ce19f44e38ee470687cd2d9218d2066f85 (diff)
downloadpackages_apps_browser-e1dbb956d762c3f07033f247c05270a9882a79a7.zip
packages_apps_browser-e1dbb956d762c3f07033f247c05270a9882a79a7.tar.gz
packages_apps_browser-e1dbb956d762c3f07033f247c05270a9882a79a7.tar.bz2
SearchBox preloading fixes.
It now seems to work pretty reliably. Nice. Requires changes to SearchBox API in frameworks/base: Depends on change: If283ecdfa62aecb1fa697b1a2cd43b771b908d72 Change-Id: I5af94c8df8f24dfafb02c4052381aa547c72684c
Diffstat (limited to 'src/com/android/browser/PreloadController.java')
-rw-r--r--src/com/android/browser/PreloadController.java49
1 files changed, 45 insertions, 4 deletions
diff --git a/src/com/android/browser/PreloadController.java b/src/com/android/browser/PreloadController.java
index 6528410..11586ea 100644
--- a/src/com/android/browser/PreloadController.java
+++ b/src/com/android/browser/PreloadController.java
@@ -22,6 +22,7 @@ import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Message;
+import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.HttpAuthHandler;
@@ -34,6 +35,9 @@ import java.util.List;
public class PreloadController implements WebViewController {
+ private static final boolean LOGD_ENABLED = false;
+ private static final String LOGTAG = "PreloadController";
+
private Context mContext;
public PreloadController(Context ctx) {
@@ -48,177 +52,214 @@ public class PreloadController implements WebViewController {
@Override
public Activity getActivity() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getActivity()");
return null;
}
@Override
public TabControl getTabControl() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getTabControl()");
return null;
}
@Override
public WebViewFactory getWebViewFactory() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getWebViewFactory()");
return null;
}
@Override
public void onSetWebView(Tab tab, WebView view) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onSetWebView()");
}
@Override
public void createSubWindow(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "createSubWindow()");
}
@Override
public void onPageStarted(Tab tab, WebView view, Bitmap favicon) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onPageStarted()");
}
@Override
public void onPageFinished(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onPageFinished()");
}
@Override
public void onProgressChanged(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onProgressChanged()");
}
@Override
public void onReceivedTitle(Tab tab, String title) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onReceivedTitle()");
}
@Override
public void onFavicon(Tab tab, WebView view, Bitmap icon) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onFavicon()");
}
@Override
public boolean shouldOverrideUrlLoading(Tab tab, WebView view, String url) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "shouldOverrideUrlLoading()");
return false;
}
@Override
public boolean shouldOverrideKeyEvent(KeyEvent event) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "shouldOverrideKeyEvent()");
return false;
}
@Override
public void onUnhandledKeyEvent(KeyEvent event) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onUnhandledKeyEvent()");
}
@Override
public void doUpdateVisitedHistory(Tab tab, boolean isReload) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "doUpdateVisitedHistory()");
}
@Override
public void getVisitedHistory(ValueCallback<String[]> callback) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getVisitedHistory()");
}
@Override
public void onReceivedHttpAuthRequest(Tab tab, WebView view,
HttpAuthHandler handler, String host,
String realm) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onReceivedHttpAuthRequest()");
}
@Override
public void onDownloadStart(Tab tab, String url, String useragent,
String contentDisposition, String mimeType,
long contentLength) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onDownloadStart()");
}
@Override
public void showCustomView(Tab tab, View view, int requestedOrientation,
CustomViewCallback callback) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "showCustomView()");
}
@Override
public void hideCustomView() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "hideCustomView()");
}
@Override
public Bitmap getDefaultVideoPoster() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getDefaultVideoPoster()");
return null;
}
@Override
public View getVideoLoadingProgressView() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "getVideoLoadingProgressView()");
return null;
}
@Override
public void showSslCertificateOnError(WebView view,
SslErrorHandler handler, SslError error) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "showSslCertificateOnError()");
}
@Override
public void onUserCanceledSsl(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onUserCanceledSsl()");
}
@Override
public void activateVoiceSearchMode(String title, List<String> results) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "activateVoiceSearchMode()");
}
@Override
public void revertVoiceSearchMode(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "revertVoiceSearchMode()");
}
@Override
public boolean shouldShowErrorConsole() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "shouldShowErrorConsole()");
return false;
}
@Override
public void onUpdatedLockIcon(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "onUpdatedLockIcon()");
}
@Override
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "openFileChooser()");
}
@Override
public void endActionMode() {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "endActionMode()");
}
@Override
public void attachSubWindow(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "attachSubWindow()");
}
@Override
public void dismissSubWindow(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "dismissSubWindow()");
}
@Override
- public Tab openTab(String url, boolean incognito, boolean setActive,
- boolean useCurrent) {
+ public Tab openTab(String url, boolean incognito, boolean setActive, boolean useCurrent) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "openTab()");
return null;
}
@Override
- public Tab openTab(String url, Tab parent, boolean setActive,
- boolean useCurrent) {
+ public Tab openTab(String url, Tab parent, boolean setActive, boolean useCurrent) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "openTab()");
return null;
}
@Override
public boolean switchToTab(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "switchToTab()");
return false;
}
@Override
public void closeTab(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "closeTab()");
}
@Override
public void setupAutoFill(Message message) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "setupAutoFill()");
}
@Override
public void bookmarkedStatusHasChanged(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "bookmarkedStatusHasChanged()");
}
@Override
public void showAutoLogin(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "showAutoLogin()");
}
@Override
public void hideAutoLogin(Tab tab) {
+ if (LOGD_ENABLED) Log.d(LOGTAG, "hideAutoLogin()");
}
}