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

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: make try happy Created 5 years, 11 months 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 63601aa1d68d730d208bea29735b08ef78c5d105..5c1b676736b4e35cd56722eccaf9e32381a6a504 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -374,15 +374,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);
+ Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab(env, obj.obj(),
+ true);
+}
+
+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