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/BaseUi.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/BaseUi.java')
-rw-r--r-- | src/com/android/browser/BaseUi.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index e1d7047..ffb2928 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -47,6 +47,7 @@ import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.webkit.WebChromeClient; import android.webkit.WebView; +import android.webkit.WebViewClassic; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.LinearLayout; @@ -344,7 +345,7 @@ public abstract class BaseUi implements UI { // Remove the container from the content and then remove the // WebView from the container. This will trigger a focus change // needed by WebView. - mainView.setEmbeddedTitleBar(null); + WebViewClassic.fromWebView(mainView).setEmbeddedTitleBar(null); FrameLayout wrapper = (FrameLayout) container.findViewById(R.id.webview_wrapper); wrapper.removeView(mainView); @@ -395,7 +396,8 @@ public abstract class BaseUi implements UI { final WebView cancelSubView = subView; cancel.setOnClickListener(new OnClickListener() { public void onClick(View v) { - cancelSubView.getWebChromeClient().onCloseWindow(cancelSubView); + WebViewClassic.fromWebView(cancelSubView).getWebChromeClient().onCloseWindow( + cancelSubView); } }); tab.setSubWebView(subView); @@ -476,7 +478,7 @@ public abstract class BaseUi implements UI { protected void setTitleGravity(int gravity) { WebView web = getWebView(); if (web != null) { - web.setTitleBarGravity(gravity); + WebViewClassic.fromWebView(web).setTitleBarGravity(gravity); } } |