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

Unified Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update webcontentsdelegateandroid Created 6 years 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
Index: components/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc
index 5a6878c30e9222a8a7b690184cc43ccf9be7512d..d1090ea8ac6d8c8ae2f9531a4fb97e81bf2c9e7a 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -373,15 +373,25 @@ void WebContentsDelegateAndroid::ShowRepostFormWarningDialog(
Java_WebContentsDelegateAndroid_showRepostFormWarningDialog(env, obj.obj());
}
-void WebContentsDelegateAndroid::ToggleFullscreenModeForTab(
+void WebContentsDelegateAndroid::EnterFullscreenModeForTab(
WebContents* web_contents,
- bool enter_fullscreen) {
+ const GURL& origin) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
if (obj.is_null())
return;
Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab(
- env, obj.obj(), enter_fullscreen);
+ env, obj.obj(), true);
blundell 2014/12/10 20:47:15 Isn't this change a no-op? I would expect it be do
mlamouri (slow - plz ping) 2014/12/10 20:52:35 It is indeed a no-op. We don't use the origin on A
+}
+
+void WebContentsDelegateAndroid::ExitFullscreenModeForTab(
+ WebContents* web_contents) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return;
+ Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab(
+ env, obj.obj(), false);
}
bool WebContentsDelegateAndroid::IsFullscreenForTabOrPending(

Powered by Google App Engine
This is Rietveld 408576698