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

Unified Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 865613002: Reduce duplicated code in AwWebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one line 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
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_web_contents_delegate.cc
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc
index b18354e6a2e863fb519b66c5d30d9d0c92610c05..2f43de1ae6d25a2e81966a85ee4b7c7aff17e0e1 100644
--- a/android_webview/native/aw_web_contents_delegate.cc
+++ b/android_webview/native/aw_web_contents_delegate.cc
@@ -210,24 +210,15 @@ void AwWebContentsDelegate::RequestMediaAccessPermission(
void AwWebContentsDelegate::EnterFullscreenModeForTab(
content::WebContents* web_contents, const GURL& origin) {
- ToggleFullscreenModeForTab(web_contents, true);
+ WebContentsDelegateAndroid::EnterFullscreenModeForTab(web_contents, origin);
+ is_fullscreen_ = true;
+ web_contents->GetRenderViewHost()->WasResized();
}
void AwWebContentsDelegate::ExitFullscreenModeForTab(
content::WebContents* web_contents) {
- ToggleFullscreenModeForTab(web_contents, false);
-}
-
-void AwWebContentsDelegate::ToggleFullscreenModeForTab(
- content::WebContents* web_contents, bool enter_fullscreen) {
- JNIEnv* env = AttachCurrentThread();
-
- ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env);
- if (java_delegate.obj()) {
- Java_AwWebContentsDelegate_toggleFullscreenModeForTab(
- env, java_delegate.obj(), enter_fullscreen);
- }
- is_fullscreen_ = enter_fullscreen;
+ WebContentsDelegateAndroid::ExitFullscreenModeForTab(web_contents);
+ is_fullscreen_ = false;
web_contents->GetRenderViewHost()->WasResized();
}
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698