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

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

Issue 2640023008: Enabling autoplay and fullscreen for downloaded media (Closed)
Patch Set: removed include 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
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93d072b59c17894f71b09cea20432fcf24391e90 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -126,7 +126,8 @@ TabAndroid::TabAndroid(JNIEnv* env, const JavaRef<jobject>& obj)
: weak_java_tab_(env, obj),
content_layer_(cc::Layer::Create()),
tab_content_manager_(NULL),
- synced_tab_delegate_(new browser_sync::SyncedTabDelegateAndroid(this)) {
+ synced_tab_delegate_(new browser_sync::SyncedTabDelegateAndroid(this)),
+ embedded_media_experience_enabled_(false) {
Java_Tab_setNativePtr(env, obj, reinterpret_cast<intptr_t>(this));
}
@@ -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() const {
+ return embedded_media_experience_enabled_;
+}
+
namespace {
class ChromeInterceptNavigationDelegate : public InterceptNavigationDelegate {
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698