diff options
author | Jonathan Dixon <joth@google.com> | 2012-02-24 00:13:06 +0000 |
---|---|---|
committer | Jonathan Dixon <joth@google.com> | 2012-03-02 11:18:30 +0000 |
commit | 4d2fcaba7fb8eb1723943ac9a10e76d509330bd1 (patch) | |
tree | 19a8905db9aa0aad4a60c1c3ef4fd7506c2089ad /src/com/android/browser/BrowserWebView.java | |
parent | f9a4c8405898fa55be50ee4b682f7e97b054a41f (diff) | |
download | packages_apps_Browser-4d2fcaba7fb8eb1723943ac9a10e76d509330bd1.zip packages_apps_Browser-4d2fcaba7fb8eb1723943ac9a10e76d509330bd1.tar.gz packages_apps_Browser-4d2fcaba7fb8eb1723943ac9a10e76d509330bd1.tar.bz2 |
Fixup browser to use WebView proxy
Has to escape out to WebViewClassic whenever it needs a hidden API.
Interdepends on https://android-git.corp.google.com/g/165608
Change-Id: Ic61dd7f57f75381864075605d5901f2688648cbd
Diffstat (limited to 'src/com/android/browser/BrowserWebView.java')
-rw-r--r-- | src/com/android/browser/BrowserWebView.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/browser/BrowserWebView.java b/src/com/android/browser/BrowserWebView.java index b763cf1..7981d8a 100644 --- a/src/com/android/browser/BrowserWebView.java +++ b/src/com/android/browser/BrowserWebView.java @@ -21,13 +21,14 @@ import android.graphics.Canvas; import android.util.AttributeSet; import android.view.View; import android.webkit.WebView; +import android.webkit.WebViewClassic; import java.util.Map; /** * Manage WebView scroll events */ -public class BrowserWebView extends WebView { +public class BrowserWebView extends WebView implements WebViewClassic.TitleBarDelegate { public interface OnScrollChangedListener { void onScrollChanged(int l, int t, int oldl, int oldt); @@ -73,18 +74,15 @@ public class BrowserWebView extends WebView { super(context); } + // From TitleBarDelegate @Override - protected int getTitleHeight() { + public int getTitleHeight() { return (mTitleBar != null) ? mTitleBar.getEmbeddedHeight() : 0; } - void hideEmbeddedTitleBar() { - scrollBy(0, getVisibleTitleHeight()); - } - + // From TitleBarDelegate @Override - public void setEmbeddedTitleBar(final View title) { - super.setEmbeddedTitleBar(title); + public void onSetEmbeddedTitleBar(final View title) { mTitleBar = (TitleBar) title; } |