diff options
author | jinsukkim@google.com <jinsukkim@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-22 07:44:17 +0000 |
---|---|---|
committer | jinsukkim@google.com <jinsukkim@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-22 07:44:17 +0000 |
commit | dc9b455015816fc94eaee243b457a4be2b6a7d4b (patch) | |
tree | eb151358115c64ebc851b1749c15f82bc8f361c0 | |
parent | bd69420d26682c79f6b6392839ba9bac4412a083 (diff) | |
download | chromium_src-dc9b455015816fc94eaee243b457a4be2b6a7d4b.zip chromium_src-dc9b455015816fc94eaee243b457a4be2b6a7d4b.tar.gz chromium_src-dc9b455015816fc94eaee243b457a4be2b6a7d4b.tar.bz2 |
Start hooking up element.requestFullscreen() for content shell
Plumbs through the required mechanism in web_contents_delegate.cc.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11410078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169231 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/shell/android/java/src/org/chromium/content_shell/Shell.java | 9 | ||||
-rw-r--r-- | content/shell/shell.h | 4 | ||||
-rw-r--r-- | content/shell/shell_android.cc | 12 |
3 files changed, 25 insertions, 0 deletions
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java index b7b8457..1d60c37 100644 --- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java +++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java @@ -191,6 +191,15 @@ public class Shell extends LinearLayout { if (progress == 1.0) postDelayed(mClearProgressRunnable, COMPLETED_PROGRESS_TIMEOUT_MS); } + @CalledByNative + private void toggleFullscreenModeForTab(boolean enterFullscreen) { + } + + @CalledByNative + private boolean isFullscreenForTabOrPending() { + return false; + } + @SuppressWarnings("unused") @CalledByNative private void setIsLoading(boolean loading) { diff --git a/content/shell/shell.h b/content/shell/shell.h index eb7485c..968b0ae 100644 --- a/content/shell/shell.h +++ b/content/shell/shell.h @@ -104,6 +104,10 @@ class Shell : public WebContentsDelegate, #if defined(OS_ANDROID) virtual void LoadProgressChanged(WebContents* source, double progress) OVERRIDE; + virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, + bool enter_fullscreen) OVERRIDE; + virtual bool IsFullscreenForTabOrPending( + const content::WebContents* web_contents) const OVERRIDE; #endif virtual void CloseContents(WebContents* source) OVERRIDE; virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/shell/shell_android.cc b/content/shell/shell_android.cc index ed191f4..5fb8cb0 100644 --- a/content/shell/shell_android.cc +++ b/content/shell/shell_android.cc @@ -66,6 +66,18 @@ void Shell::LoadProgressChanged(WebContents* source, double progress) { Java_Shell_onLoadProgressChanged(env, java_object_.obj(), progress); } +void Shell::ToggleFullscreenModeForTab(WebContents* web_contents, + bool enter_fullscreen) { + JNIEnv* env = AttachCurrentThread(); + Java_Shell_toggleFullscreenModeForTab( + env, java_object_.obj(), enter_fullscreen); +} + +bool Shell::IsFullscreenForTabOrPending(const WebContents* web_contents) const { + JNIEnv* env = AttachCurrentThread(); + return Java_Shell_isFullscreenForTabOrPending(env, java_object_.obj()); +} + void Shell::Close() { // TODO(tedchoc): Implement Close method for android shell NOTIMPLEMENTED(); |