Enable fullscreen support
Always allow the tab to go fullscreen. Explicit call to
exit fullscreen is added. Fullscreen layout logic moved
to base ui class.
Change-Id: I4474d90f99bf4753dedbe453b21f126668c40f64
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index ab59853..f948203 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -61,7 +61,6 @@
import android.widget.FrameLayout;
import android.widget.Button;
-import com.android.browser.R;
import com.android.browser.TabControl.OnThumbnailUpdatedListener;
import com.android.browser.homepages.HomeProvider;
import com.android.browser.mynavigation.MyNavigationUtil;
@@ -732,20 +731,25 @@
protected void setTabFullscreen(boolean fullScreen) {
Controller controller = (Controller)mWebViewController;
-
- if (!mSettings.useFullscreen())
- controller.getUi().setFullscreen(fullScreen);
-
- if (getWebView() != null) {
- if (fullScreen)
- getWebView().updateTopControls(true, false, true);
- else
- getWebView().updateTopControls(true, true, true);
- }
-
+ controller.getUi().showFullscreen(fullScreen);
mFullScreen = fullScreen;
}
+ public boolean exitFullscreen() {
+ if (mFullScreen) {
+ Controller controller = (Controller)mWebViewController;
+ controller.getUi().showFullscreen(false);
+ if (getWebView() != null)
+ getWebView().exitFullscreen();
+ mFullScreen = false;
+ return true;
+ }
+ return false;
+ }
+
+
+
+
// -------------------------------------------------------------------------
// WebChromeClient implementation for the main WebView
// -------------------------------------------------------------------------