| Index: chrome/browser/android/preferences/pref_service_bridge.cc
|
| diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
|
| index d69166166cea77a3be14a4e00d1f6fe3ac5ea6ae..f0303b285251913573c9ced37bcc6681556c1bfb 100644
|
| --- a/chrome/browser/android/preferences/pref_service_bridge.cc
|
| +++ b/chrome/browser/android/preferences/pref_service_bridge.cc
|
| @@ -208,6 +208,11 @@ static jboolean GetAcceptCookiesManaged(JNIEnv* env,
|
| return IsContentSettingManaged(CONTENT_SETTINGS_TYPE_COOKIES);
|
| }
|
|
|
| +static jboolean GetAutoplayEnabled(JNIEnv* env,
|
| + const JavaParamRef<jobject>& obj) {
|
| + return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_AUTOPLAY);
|
| +}
|
| +
|
| static jboolean GetBackgroundSyncEnabled(JNIEnv* env,
|
| const JavaParamRef<jobject>& obj) {
|
| return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC);
|
| @@ -675,6 +680,16 @@ static void RequestInfoAboutOtherFormsOfBrowsingHistory(
|
| base::Owned(new ScopedJavaGlobalRef<jobject>(env, listener))));
|
| }
|
|
|
| +static void SetAutoplayEnabled(JNIEnv* env,
|
| + const JavaParamRef<jobject>& obj,
|
| + jboolean allow) {
|
| + HostContentSettingsMap* host_content_settings_map =
|
| + HostContentSettingsMapFactory::GetForProfile(GetOriginalProfile());
|
| + host_content_settings_map->SetDefaultContentSetting(
|
| + CONTENT_SETTINGS_TYPE_AUTOPLAY,
|
| + allow ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK);
|
| +}
|
| +
|
| static void SetAllowCookiesEnabled(JNIEnv* env,
|
| const JavaParamRef<jobject>& obj,
|
| jboolean allow) {
|
|
|