Chromium Code Reviews| 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..822db777c75410650c9a7fe969ce984818c7502f 100644 |
| --- a/android_webview/native/aw_web_contents_delegate.cc |
| +++ b/android_webview/native/aw_web_contents_delegate.cc |
| @@ -210,25 +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; |
| - web_contents->GetRenderViewHost()->WasResized(); |
| + is_fullscreen_ = false; |
| + WebContentsDelegateAndroid::ExitFullscreenModeForTab(web_contents); |
|
Ignacio Solla
2015/01/21 14:23:04
aren't you misssing the call to
web_contents->Get
Hugo Holgersson
2015/01/21 14:26:44
Done.
|
| } |
| bool AwWebContentsDelegate::IsFullscreenForTabOrPending( |