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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2640023008: Enabling autoplay and fullscreen for downloaded media (Closed)
Patch Set: Changed to override pref from ContentBrowserClient Created 3 years, 10 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: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 1eb487d3245864a136d75eeaefb1cb61c2b6f049..741fbae492b5bf55c903a81620471e5f3402dddd 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,22 @@ bool TabAndroid::HasPrerenderedUrl(JNIEnv* env,
return HasPrerenderedUrl(gurl);
}
+void TabAndroid::EnableEmbeddedMediaExperience(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ jboolean enabled) {
+ embedded_media_experience_enabled_ = enabled;
+
+ if (!web_contents() || !web_contents()->GetRenderViewHost())
+ return;
+
+ web_contents()->GetRenderViewHost()->OnWebkitPreferencesChanged();
+}
+
+bool TabAndroid::ShouldEnableEmbeddedMediaExperience() {
+ return embedded_media_experience_enabled_;
+}
+
namespace {
class ChromeInterceptNavigationDelegate : public InterceptNavigationDelegate {

Powered by Google App Engine
This is Rietveld 408576698