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

Unified Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 292573004: Don't use webmediaplayer to FullscreenController about fullscreen change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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: 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 f9c42b12d204b816d75a241ba409730db8e70bc4..ee51dc50f9f44e812b3ca4c83225bb03b355594d 100644
--- a/android_webview/native/aw_web_contents_delegate.cc
+++ b/android_webview/native/aw_web_contents_delegate.cc
@@ -47,7 +47,8 @@ base::LazyInstance<AwJavaScriptDialogManager>::Leaky
AwWebContentsDelegate::AwWebContentsDelegate(
JNIEnv* env,
jobject obj)
- : WebContentsDelegateAndroid(env, obj) {
+ : WebContentsDelegateAndroid(env, obj),
+ is_fullscreen_(false) {
}
AwWebContentsDelegate::~AwWebContentsDelegate() {
@@ -207,6 +208,25 @@ void AwWebContentsDelegate::RequestMediaAccessPermission(
new MediaAccessPermissionRequest(request, callback)));
}
+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();
+}
+
+bool AwWebContentsDelegate::IsFullscreenForTabOrPending(
+ const content::WebContents* web_contents) const {
+ return is_fullscreen_;
+}
+
+
static void FilesSelectedInChooser(
JNIEnv* env, jclass clazz,
jint process_id, jint render_id, jint mode_flags,
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698