Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / shell / android / java / src / org / chromium / content_shell / Shell.java
index cb8c995..cdb8658 100644 (file)
@@ -63,6 +63,7 @@ public class Shell extends LinearLayout {
     private WindowAndroid mWindow;
 
     private boolean mLoading = false;
+    private boolean mIsFullscreen = false;
 
     /**
      * Constructor for inflating via XML.
@@ -261,11 +262,14 @@ public class Shell extends LinearLayout {
 
     @CalledByNative
     private void toggleFullscreenModeForTab(boolean enterFullscreen) {
+        mIsFullscreen = enterFullscreen;
+        LinearLayout toolBar = (LinearLayout) findViewById(R.id.toolbar);
+        toolBar.setVisibility(enterFullscreen ? GONE : VISIBLE);
     }
 
     @CalledByNative
     private boolean isFullscreenForTabOrPending() {
-        return false;
+        return mIsFullscreen;
     }
 
     @SuppressWarnings("unused")
@@ -330,6 +334,13 @@ public class Shell extends LinearLayout {
         return mContentViewCore;
     }
 
+     /**
+     * @return The {@link WebContents} currently managing the content shown by this Shell.
+     */
+    public WebContents getWebContents() {
+        return mWebContents;
+    }
+
     private void setKeyboardVisibilityForUrl(boolean visible) {
         InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
                 Context.INPUT_METHOD_SERVICE);