Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4658)

Unified Diff: chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 11360077: Start hooking up "element.requestFullscreen()" in chrome for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses the comment Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
index af997c4120abd0f746980df0709e99d9e107b4b1..b0dc6ae13c67b0c6c156f6039a58735d18ad7b47 100644
--- a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -280,6 +280,27 @@ void WebContentsDelegateAndroid::ShowRepostFormWarningDialog(
content_view_core.obj());
}
+void WebContentsDelegateAndroid::ToggleFullscreenModeForTab(
+ WebContents* web_contents,
+ bool enter_fullscreen) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return;
+ Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab(
+ env, obj.obj(), enter_fullscreen);
+}
+
+bool WebContentsDelegateAndroid::IsFullscreenForTabOrPending(
+ const WebContents* web_contents) const {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return false;
+ return Java_WebContentsDelegateAndroid_isFullscreenForTabOrPending(
+ env, obj.obj());
+}
+
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------
« no previous file with comments | « chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698