Chromium Code Reviews| Index: chrome/browser/android/tab_android.cc |
| diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc |
| index 421ec3dfe30464342678a851c699dc5254197e65..e97c04f6a310f82fe757283559ae4e11b6600374 100644 |
| --- a/chrome/browser/android/tab_android.cc |
| +++ b/chrome/browser/android/tab_android.cc |
| @@ -73,6 +73,7 @@ |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/common/browser_controls_state.h" |
| #include "content/public/common/resource_request_body.h" |
| +#include "content/public/common/web_preferences.h" |
| #include "jni/Tab_jni.h" |
| #include "net/base/escape.h" |
| #include "skia/ext/image_operations.h" |
| @@ -716,6 +717,19 @@ bool TabAndroid::HasPrerenderedUrl(JNIEnv* env, |
| return HasPrerenderedUrl(gurl); |
| } |
| +void TabAndroid::ConfigureEmbeddedMediaExperience( |
| + JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& obj) { |
| + content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| + if (!host) |
| + return; |
| + |
| + content::WebPreferences prefs = host->GetWebkitPreferences(); |
| + prefs.user_gesture_required_for_media_playback = false; |
|
mlamouri (slow - plz ping)
2017/02/17 10:01:43
Is it needed? Can't you simply autoplay from C++ t
shaktisahu
2017/02/17 19:18:06
Done. Thanks!
|
| + prefs.embedded_media_experience_enabled = true; |
| + host->UpdateWebkitPreferences(prefs); |
|
mlamouri (slow - plz ping)
2017/02/17 10:01:43
That does not sound correct because if any one cal
shaktisahu
2017/02/17 19:18:06
I looked around and didn't find any function that
mlamouri (slow - plz ping)
2017/02/20 11:31:50
The issue is that you are calling UpdateWebkitPref
shaktisahu
2017/02/21 07:02:56
Done.
Thanks! I think this is especially useful fo
|
| +} |
| + |
| namespace { |
| class ChromeInterceptNavigationDelegate : public InterceptNavigationDelegate { |