diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-08-19 16:19:26 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-08-24 16:55:42 -0400 |
| commit | b2359262b48bf33887c72be94b044cfdfd602858 (patch) | |
| tree | 8906ed809ac1a25daae7288e35cd41144d4d8153 /core/java/android/webkit/CallbackProxy.java | |
| parent | c0234a9df9cffc0166c39eb0e8561d664a5438a3 (diff) | |
Implement new title bar hiding/showing behavior.
Remove the code that hides the title bar when the page finishes loading.
When the user double taps, if it did not result in changing the viewing
mode (i.e. on a mobile site), send a message to the client so we can
toggle the title bar's visibility. Required for a change to
packages/apps/Browser
Change-Id: I0040fd183ce5673a4069e943f38eb31599c0ca7d
Diffstat (limited to 'core/java/android/webkit/CallbackProxy.java')
| -rw-r--r-- | core/java/android/webkit/CallbackProxy.java | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index e77d29b9ffb2..6abf4c18a99f 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -70,9 +70,6 @@ class CallbackProxy extends Handler { private final WebBackForwardList mBackForwardList; // Used to call startActivity during url override. private final Context mContext; - // Stores the URL being loaded and the viewing mode to switch into when - // the URL finishes loading. - private ChangeViewModeOnFinishedLoad mChange; // Message Ids private static final int PAGE_STARTED = 100; @@ -181,36 +178,16 @@ class CallbackProxy extends Handler { /** * Tell the host application that the WebView has changed viewing modes. - * @param toZoomedOut If true, the WebView has zoomed out so that the page - * fits the screen. If false, it is zoomed to the setting - * specified by the user. + * @param newViewingMode One of the values described in WebView as possible + * values for the viewing mode */ - /* package */ void uiOnChangeViewingMode(boolean toZoomOverview) { + /* package */ void uiOnChangeViewingMode(int newViewingMode) { if (mWebChromeClient != null) { - mWebChromeClient.onChangeViewingMode(toZoomOverview); - } - } - - private static class ChangeViewModeOnFinishedLoad { - boolean mToZoomOverView; - String mOriginalUrl; - ChangeViewModeOnFinishedLoad(boolean toZoomOverview, - String originalUrl) { - mToZoomOverView = toZoomOverview; - mOriginalUrl = originalUrl; + mWebChromeClient.onChangeViewingMode(mWebView, newViewingMode); } } /** - * Keep track of the url and the viewing mode to change into. If/when that - * url finishes loading, this will change the viewing mode. - */ - /* package */ void uiChangeViewingModeOnFinishedLoad( - boolean toZoomOverview, String originalUrl) { - if (mWebChromeClient == null) return; - mChange = new ChangeViewModeOnFinishedLoad(toZoomOverview, originalUrl); - } - /** * Called by the UI side. Calling overrideUrlLoading from the WebCore * side will post a message to call this method. */ @@ -271,15 +248,6 @@ class CallbackProxy extends Handler { if (mWebViewClient != null) { mWebViewClient.onPageFinished(mWebView, (String) msg.obj); } - if (mChange != null) { - if (mWebView.getOriginalUrl().equals(mChange.mOriginalUrl)) { - uiOnChangeViewingMode(mChange.mToZoomOverView); - } else { - // The user has gone to a different page, so there is - // no need to hang on to the old object. - mChange = null; - } - } break; case RECEIVED_ICON: |
