Timezone-customization.patch
This commit is contained in:
parent
908aed564a
commit
837f9674ef
1 changed files with 108 additions and 138 deletions
|
@ -5,67 +5,26 @@ Subject: Timezone customization
|
|||
Allow specifying a custom timezone, or using a random one.
|
||||
|
||||
See also: https://github.com/bromite/bromite/wiki/TimezoneOverride
|
||||
FILE:Timezone-customization.patch
|
||||
---
|
||||
.../ChromeSiteSettingsHelpClient.java | 18 ++
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 3 +
|
||||
.../res/layout/time_zone_select_dialog.xml | 36 ++++
|
||||
...ezoneoverride_site_settings_preference.xml | 68 ++++++
|
||||
.../res/xml/single_website_preferences.xml | 2 +
|
||||
.../res/xml/site_settings_preferences.xml | 4 +
|
||||
.../java/res/xml/website_preferences.xml | 9 +
|
||||
.../ContentSettingsResources.java | 29 +++
|
||||
.../site_settings/SingleCategorySettings.java | 72 ++++++-
|
||||
.../site_settings/SingleWebsiteSettings.java | 20 ++
|
||||
.../site_settings/SiteSettings.java | 2 +-
|
||||
.../site_settings/SiteSettingsCategory.java | 9 +-
|
||||
.../site_settings/SiteSettingsHelpClient.java | 7 +
|
||||
...imezoneOverrideSiteSettingsPreference.java | 193 ++++++++++++++++++
|
||||
.../browser_ui/site_settings/Website.java | 10 +
|
||||
.../WebsitePermissionsFetcher.java | 3 +
|
||||
.../WebsitePreferenceBridge.java | 12 ++
|
||||
.../android/website_preference_bridge.cc | 17 ++
|
||||
.../strings/android/site_settings.grdp | 35 ++++
|
||||
.../browser/content_settings_pref_provider.cc | 16 ++
|
||||
.../browser/content_settings_pref_provider.h | 5 +
|
||||
.../core/browser/content_settings_registry.cc | 12 ++
|
||||
.../core/browser/content_settings_utils.cc | 7 +
|
||||
.../core/browser/host_content_settings_map.cc | 8 +
|
||||
.../core/browser/host_content_settings_map.h | 3 +
|
||||
.../core/common/content_settings.cc | 4 +-
|
||||
.../core/common/content_settings.h | 2 +
|
||||
.../core/common/content_settings.mojom | 2 +
|
||||
.../common/content_settings_mojom_traits.cc | 4 +-
|
||||
.../common/content_settings_mojom_traits.h | 10 +
|
||||
.../core/common/content_settings_types.h | 3 +
|
||||
.../core/common/pref_names.cc | 3 +
|
||||
.../content_settings/core/common/pref_names.h | 2 +
|
||||
.../renderer/content_settings_agent_impl.cc | 89 ++++++++
|
||||
.../renderer/content_settings_agent_impl.h | 4 +
|
||||
.../WebLayerSiteSettingsClient.java | 3 +
|
||||
36 files changed, 716 insertions(+), 10 deletions(-)
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsHelpClient.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsHelpClient.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsHelpClient.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsHelpClient.java
|
||||
@@ -11,6 +11,12 @@ import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.components.browser_ui.site_settings.SiteSettingsHelpClient;
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
|
||||
index e931dd0668..1bb6492f2e 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
|
||||
@@ -40,6 +40,10 @@ import org.chromium.content_public.common.ContentSwitches;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
+import android.app.Activity;
|
||||
+import android.content.Context;
|
||||
+import android.content.Intent;
|
||||
+import android.net.Uri;
|
||||
+import android.provider.Browser;
|
||||
+import android.net.Uri;
|
||||
+
|
||||
/**
|
||||
* A SiteSettingsHelpClient instance that provides Chrome-specific help functionality.
|
||||
* A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic.
|
||||
*/
|
||||
@@ -33,4 +39,16 @@ public class ChromeSiteSettingsHelpClient implements SiteSettingsHelpClient {
|
||||
currentActivity.getString(R.string.help_context_protected_content),
|
||||
Profile.getLastUsedRegularProfile(), null);
|
||||
@@ -252,4 +256,16 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate {
|
||||
}
|
||||
mPrivacySandboxController.dismissSnackbar();
|
||||
}
|
||||
+
|
||||
+ // open wiki page for documentation about the timezone override feature
|
||||
|
@ -81,9 +40,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C
|
|||
+ }
|
||||
}
|
||||
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
index dfa022b435..f3a79e1eed 100644
|
||||
--- a/components/browser_ui/site_settings/android/BUILD.gn
|
||||
+++ b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
@@ -74,6 +74,7 @@ android_library("java") {
|
||||
@@ -72,6 +72,7 @@ android_library("java") {
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java",
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePreference.java",
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java",
|
||||
|
@ -91,7 +51,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b
|
|||
]
|
||||
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
|
||||
resources_package = "org.chromium.components.browser_ui.site_settings"
|
||||
@@ -204,6 +205,8 @@ android_resources("java_resources") {
|
||||
@@ -202,6 +203,8 @@ android_resources("java_resources") {
|
||||
"java/res/xml/single_website_preferences.xml",
|
||||
"java/res/xml/site_settings_preferences.xml",
|
||||
"java/res/xml/website_preferences.xml",
|
||||
|
@ -102,6 +62,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b
|
|||
deps = [
|
||||
diff --git a/components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml b/components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
|
||||
new file mode 100755
|
||||
index 0000000000..05ac75a4cb
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
|
||||
@@ -0,0 +1,36 @@
|
||||
|
@ -144,6 +105,7 @@ new file mode 100755
|
|||
\ No newline at end of file
|
||||
diff --git a/components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml b/components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
|
||||
new file mode 100755
|
||||
index 0000000000..e7570d55a1
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
|
||||
@@ -0,0 +1,68 @@
|
||||
|
@ -216,18 +178,20 @@ new file mode 100755
|
|||
+
|
||||
+</LinearLayout>
|
||||
diff --git a/components/browser_ui/site_settings/android/java/res/xml/single_website_preferences.xml b/components/browser_ui/site_settings/android/java/res/xml/single_website_preferences.xml
|
||||
index e146a00c25..239f3f7a94 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/res/xml/single_website_preferences.xml
|
||||
+++ b/components/browser_ui/site_settings/android/java/res/xml/single_website_preferences.xml
|
||||
@@ -59,6 +59,8 @@
|
||||
android:key="push_notifications_list" />
|
||||
<ListPreference
|
||||
android:key="javascript_permission_list" />
|
||||
@@ -33,6 +33,8 @@
|
||||
android:title="@string/website_settings_site_category" />
|
||||
<org.chromium.components.browser_ui.settings.TextMessagePreference
|
||||
android:key="site_title" />
|
||||
+ <ListPreference
|
||||
+ android:key="timezone_override_permission_list" />
|
||||
<ListPreference
|
||||
android:key="popup_permission_list" />
|
||||
<ListPreference
|
||||
<PreferenceCategory
|
||||
android:key="site_usage"
|
||||
android:title="@string/website_settings_usage_category" />
|
||||
diff --git a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
|
||||
index cda3d4d1b6..5a9d17a93a 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
|
||||
+++ b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
|
||||
@@ -41,6 +41,10 @@
|
||||
|
@ -242,6 +206,7 @@ diff --git a/components/browser_ui/site_settings/android/java/res/xml/site_setti
|
|||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings"
|
||||
diff --git a/components/browser_ui/site_settings/android/java/res/xml/website_preferences.xml b/components/browser_ui/site_settings/android/java/res/xml/website_preferences.xml
|
||||
index 0745adba2d..35d1cfc9da 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/res/xml/website_preferences.xml
|
||||
+++ b/components/browser_ui/site_settings/android/java/res/xml/website_preferences.xml
|
||||
@@ -13,6 +13,12 @@
|
||||
|
@ -268,9 +233,10 @@ diff --git a/components/browser_ui/site_settings/android/java/res/xml/website_pr
|
|||
<!-- A checkbox for enabling a quiet ui for notification prompts. Only shown in the Notifications category. -->
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
index cf4e3bfeeb..2f86ee66b6 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
@@ -220,6 +220,11 @@ public class ContentSettingsResources {
|
||||
@@ -227,6 +227,11 @@ public class ContentSettingsResources {
|
||||
ContentSettingValues.ASK, ContentSettingValues.BLOCK,
|
||||
R.string.website_settings_category_vr_ask,
|
||||
R.string.website_settings_category_vr_blocked));
|
||||
|
@ -282,7 +248,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
sResourceInfo = localMap;
|
||||
}
|
||||
return sResourceInfo;
|
||||
@@ -295,6 +300,23 @@ public class ContentSettingsResources {
|
||||
@@ -355,6 +360,23 @@ public class ContentSettingsResources {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,7 +272,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
/**
|
||||
* Returns the string resource id for a content type to show with a permission category.
|
||||
* @param enabled Whether the content type is enabled.
|
||||
@@ -398,6 +420,13 @@ public class ContentSettingsResources {
|
||||
@@ -458,6 +480,13 @@ public class ContentSettingsResources {
|
||||
return descriptionIDs;
|
||||
}
|
||||
}
|
||||
|
@ -321,6 +287,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
assert false;
|
||||
return null;
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
|
||||
index 68ba45b1a3..9cfdace0f0 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
|
||||
@@ -54,6 +54,10 @@ import org.chromium.components.prefs.PrefService;
|
||||
|
@ -366,26 +333,25 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
if (queryHasChanged) getInfoForOrigins();
|
||||
});
|
||||
|
||||
- if (getSiteSettingsClient().getSiteSettingsHelpClient().isHelpAndFeedbackEnabled()) {
|
||||
+ if (getSiteSettingsClient().getSiteSettingsHelpClient().isHelpAndFeedbackEnabled() ||
|
||||
- if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled()) {
|
||||
+ if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled() ||
|
||||
+ mCategory.showSites(SiteSettingsCategory.Type.TIMEZONE_OVERRIDE) ) {
|
||||
MenuItem help = menu.add(
|
||||
Menu.NONE, R.id.menu_id_site_settings_help, Menu.NONE, R.string.menu_help);
|
||||
help.setIcon(VectorDrawableCompat.create(
|
||||
@@ -370,7 +380,11 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -370,7 +380,10 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == R.id.menu_id_site_settings_help) {
|
||||
- if (mCategory.showSites(SiteSettingsCategory.Type.PROTECTED_MEDIA)) {
|
||||
+ if (mCategory.showSites(SiteSettingsCategory.Type.TIMEZONE_OVERRIDE)) {
|
||||
+ getSiteSettingsClient()
|
||||
+ .getSiteSettingsHelpClient()
|
||||
+ getSiteSettingsDelegate()
|
||||
+ .launchTimeZoneOverrideHelpAndFeedbackActivity(getActivity());
|
||||
+ } else if (mCategory.showSites(SiteSettingsCategory.Type.PROTECTED_MEDIA)) {
|
||||
getSiteSettingsClient()
|
||||
.getSiteSettingsHelpClient()
|
||||
.launchProtectedContentHelpAndFeedbackActivity(getActivity());
|
||||
@@ -451,6 +465,12 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
getSiteSettingsDelegate().launchProtectedContentHelpAndFeedbackActivity(
|
||||
getActivity());
|
||||
} else {
|
||||
@@ -448,6 +461,12 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
WebsitePreferenceBridge.setContentSetting(
|
||||
browserContextHandle, mCategory.getContentSettingsType(), setting);
|
||||
getInfoForOrigins();
|
||||
|
@ -398,7 +364,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
} else if (FOUR_STATE_COOKIE_TOGGLE_KEY.equals(preference.getKey())) {
|
||||
setCookieSettingsPreference((CookieSettingsState) newValue);
|
||||
getInfoForOrigins();
|
||||
@@ -536,6 +556,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -541,6 +560,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
? R.string.website_settings_add_site_description_cookies_block
|
||||
: R.string.website_settings_add_site_description_cookies_allow;
|
||||
}
|
||||
|
@ -407,7 +373,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
}
|
||||
assert resource > 0;
|
||||
return getString(resource);
|
||||
@@ -576,6 +598,13 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -581,6 +602,13 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES) && mRequiresFourStateSetting) {
|
||||
setting = cookieSettingsExceptionShouldBlock() ? ContentSettingValues.BLOCK
|
||||
: ContentSettingValues.ALLOW;
|
||||
|
@ -421,7 +387,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
} else {
|
||||
setting = (WebsitePreferenceBridge.isCategoryEnabled(
|
||||
browserContextHandle, mCategory.getContentSettingsType()))
|
||||
@@ -633,6 +662,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -637,6 +665,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
&& !WebsitePreferenceBridge.isCategoryEnabled(
|
||||
browserContextHandle, ContentSettingsType.AUTOMATIC_DOWNLOADS)) {
|
||||
exception = true;
|
||||
|
@ -430,7 +396,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
}
|
||||
if (exception) {
|
||||
getPreferenceScreen().addPreference(new AddExceptionPreference(getStyledContext(),
|
||||
@@ -806,7 +837,14 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -808,7 +838,14 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
TriStateSiteSettingsPreference triStateToggle =
|
||||
(TriStateSiteSettingsPreference) getPreferenceScreen().findPreference(
|
||||
TRI_STATE_TOGGLE_KEY);
|
||||
|
@ -446,7 +412,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
} else if (mRequiresFourStateSetting) {
|
||||
FourStateCookieSettingsPreference fourStateCookieToggle =
|
||||
(FourStateCookieSettingsPreference) getPreferenceScreen().findPreference(
|
||||
@@ -835,6 +873,9 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -837,6 +874,9 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
(FourStateCookieSettingsPreference) screen.findPreference(
|
||||
FOUR_STATE_COOKIE_TOGGLE_KEY);
|
||||
// TODO(crbug.com/1104836): Remove the old third-party cookie blocking UI
|
||||
|
@ -456,7 +422,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
Preference notificationsVibrate = screen.findPreference(NOTIFICATIONS_VIBRATE_TOGGLE_KEY);
|
||||
Preference notificationsQuietUi = screen.findPreference(NOTIFICATIONS_QUIET_UI_TOGGLE_KEY);
|
||||
Preference explainProtectedMediaKey = screen.findPreference(EXPLAIN_PROTECTED_MEDIA_KEY);
|
||||
@@ -846,20 +887,32 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -848,20 +888,32 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
if (mRequiresTriStateSetting) {
|
||||
screen.removePreference(binaryToggle);
|
||||
screen.removePreference(fourStateCookieToggle);
|
||||
|
@ -490,7 +456,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
|
||||
if (permissionBlockedByOs) {
|
||||
maybeShowOsWarning(screen);
|
||||
@@ -974,6 +1027,15 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -976,6 +1028,15 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
triStateToggle.initialize(setting, descriptionIds);
|
||||
}
|
||||
|
||||
|
@ -499,17 +465,18 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
+ timeOverrideStateToggle.setOnPreferenceChangeListener(this);
|
||||
+ @ContentSettingValues
|
||||
+ int setting = WebsitePreferenceBridge.getContentSetting(
|
||||
+ getSiteSettingsClient().getBrowserContextHandle(), ContentSettingsType.TIMEZONE_OVERRIDE);
|
||||
+ timeOverrideStateToggle.initialize(setting, getSiteSettingsClient().getBrowserContextHandle());
|
||||
+ getSiteSettingsDelegate().getBrowserContextHandle(), ContentSettingsType.TIMEZONE_OVERRIDE);
|
||||
+ timeOverrideStateToggle.initialize(setting, getSiteSettingsDelegate().getBrowserContextHandle());
|
||||
+ }
|
||||
+
|
||||
private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) {
|
||||
binaryToggle.setOnPreferenceChangeListener(this);
|
||||
binaryToggle.setTitle(ContentSettingsResources.getTitle(contentType));
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
|
||||
index 6af75b0627..c3d3232742 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
|
||||
@@ -109,6 +109,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
|
||||
@@ -135,6 +135,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
|
||||
return "popup_permission_list";
|
||||
case ContentSettingsType.SOUND:
|
||||
return "sound_permission_list";
|
||||
|
@ -518,8 +485,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
case ContentSettingsType.AR:
|
||||
return "ar_permission_list";
|
||||
case ContentSettingsType.MEDIASTREAM_CAMERA:
|
||||
@@ -836,6 +838,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
|
||||
setUpPreferenceCommon(preference, value);
|
||||
@@ -881,6 +883,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
|
||||
@ContentSettingValues @Nullable Integer value, boolean isEmbargoed) {
|
||||
ListPreference listPreference = (ListPreference) preference;
|
||||
|
||||
+ if (getContentSettingsTypeFromPreferenceKey(preference.getKey()) == ContentSettingsType.TIMEZONE_OVERRIDE) {
|
||||
|
@ -544,6 +511,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
CharSequence[] descriptions = new String[2];
|
||||
keys[0] = ContentSetting.toString(ContentSettingValues.ALLOW);
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java
|
||||
index a056976a73..eac4bb7261 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java
|
||||
@@ -113,7 +113,7 @@ public class SiteSettings
|
||||
|
@ -556,9 +524,10 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
p.setSummary(ContentSettingsResources.getCategorySummary(contentType, checked));
|
||||
}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
index 5c0f84d697..53c1b13931 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
@@ -43,7 +43,7 @@ public class SiteSettingsCategory {
|
||||
@@ -42,7 +42,7 @@ public class SiteSettingsCategory {
|
||||
Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION,
|
||||
Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS,
|
||||
Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY,
|
||||
|
@ -567,7 +536,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Type {
|
||||
// All updates here must also be reflected in {@link #preferenceKey(int)
|
||||
@@ -71,10 +71,11 @@ public class SiteSettingsCategory {
|
||||
@@ -70,10 +70,11 @@ public class SiteSettingsCategory {
|
||||
int BLUETOOTH = 20;
|
||||
int VIRTUAL_REALITY = 21;
|
||||
int USE_STORAGE = 22;
|
||||
|
@ -580,7 +549,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
}
|
||||
|
||||
private final BrowserContextHandle mBrowserContextHandle;
|
||||
@@ -192,6 +193,8 @@ public class SiteSettingsCategory {
|
||||
@@ -191,6 +192,8 @@ public class SiteSettingsCategory {
|
||||
return ContentSettingsType.USB_GUARD;
|
||||
case Type.VIRTUAL_REALITY:
|
||||
return ContentSettingsType.VR;
|
||||
|
@ -589,7 +558,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
// case Type.ALL_SITES
|
||||
// case Type.USE_STORAGE
|
||||
default:
|
||||
@@ -265,6 +268,8 @@ public class SiteSettingsCategory {
|
||||
@@ -264,6 +267,8 @@ public class SiteSettingsCategory {
|
||||
return "use_storage";
|
||||
case Type.VIRTUAL_REALITY:
|
||||
return "virtual_reality";
|
||||
|
@ -598,23 +567,20 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
default:
|
||||
assert false;
|
||||
return "";
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsHelpClient.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsHelpClient.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsHelpClient.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsHelpClient.java
|
||||
@@ -28,4 +28,11 @@ public interface SiteSettingsHelpClient {
|
||||
* @see org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher#show
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java
|
||||
index d3ee6e055a..22d0974e9c 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java
|
||||
@@ -123,4 +123,6 @@ public interface SiteSettingsDelegate {
|
||||
* Dismisses the Privacy Sandbox snackbar, if active.
|
||||
*/
|
||||
void launchProtectedContentHelpAndFeedbackActivity(Activity currentActivity);
|
||||
void dismissPrivacySandboxSnackbar();
|
||||
+
|
||||
+ /**
|
||||
+ * Launches a support page related to timezone override content.
|
||||
+ *
|
||||
+ * @see org.chromium.chrome.browser.help.HelpAndFeedback#show
|
||||
+ */
|
||||
+ void launchTimeZoneOverrideHelpAndFeedbackActivity(Activity currentActivity);
|
||||
}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
new file mode 100755
|
||||
index 0000000000..c7bbe69448
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
@@ -0,0 +1,193 @@
|
||||
|
@ -812,9 +778,10 @@ new file mode 100755
|
|||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
|
||||
index 155a322d8b..734c39256e 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
|
||||
@@ -229,6 +229,16 @@ public final class Website implements Serializable {
|
||||
@@ -232,6 +232,16 @@ public final class Website implements Serializable {
|
||||
} else {
|
||||
RecordUserAction.record("SoundContentSetting.UnmuteBy.SiteSettings");
|
||||
}
|
||||
|
@ -832,6 +799,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
// We want to call setContentSetting even after explicitly setting
|
||||
// mContentSettingException above because this will trigger the actual change
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
|
||||
index a742e9a8d3..1eb28eb86e 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
|
||||
@@ -64,6 +64,7 @@ public class WebsitePermissionsFetcher {
|
||||
|
@ -852,6 +820,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
queue.next();
|
||||
}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java
|
||||
index 3975f0abb2..97d8b193b8 100644
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java
|
||||
@@ -223,6 +223,8 @@ public class WebsitePreferenceBridge {
|
||||
|
@ -887,9 +856,10 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
}
|
||||
}
|
||||
diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc
|
||||
index 0bc9fdb61f..615ca40fcc 100644
|
||||
--- a/components/browser_ui/site_settings/android/website_preference_bridge.cc
|
||||
+++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc
|
||||
@@ -918,3 +918,20 @@ static jboolean JNI_WebsitePreferenceBridge_GetLocationAllowedByPolicy(
|
||||
@@ -918,3 +918,19 @@ static jboolean JNI_WebsitePreferenceBridge_GetLocationAllowedByPolicy(
|
||||
->GetDefaultContentSetting(ContentSettingsType::GEOLOCATION,
|
||||
nullptr) == CONTENT_SETTING_ALLOW;
|
||||
}
|
||||
|
@ -909,8 +879,8 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid
|
|||
+ GetHostContentSettingsMap(jbrowser_context_handle)->GetTimezoneOverrideValue(timezone);
|
||||
+ return ConvertUTF8ToJavaString(env, timezone);
|
||||
+}
|
||||
+
|
||||
diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp
|
||||
index a48547185b..fa0c75aa7d 100644
|
||||
--- a/components/browser_ui/strings/android/site_settings.grdp
|
||||
+++ b/components/browser_ui/strings/android/site_settings.grdp
|
||||
@@ -69,6 +69,9 @@
|
||||
|
@ -963,9 +933,10 @@ diff --git a/components/browser_ui/strings/android/site_settings.grdp b/componen
|
|||
|
||||
<message name="IDS_WEBSITE_SETTINGS_CATEGORY_SOUND_ALLOWED" desc="Summary text explaining that sites are allowed to play sound and that it is the recommended setting.">
|
||||
diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc
|
||||
index a00cacb48f..345ebb2727 100644
|
||||
--- a/components/content_settings/core/browser/content_settings_pref_provider.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_pref_provider.cc
|
||||
@@ -106,6 +106,8 @@ void PrefProvider::RegisterProfilePrefs(
|
||||
@@ -107,6 +107,8 @@ void PrefProvider::RegisterProfilePrefs(
|
||||
registry->RegisterDictionaryPref(kDeprecatedNativeFileSystemReadGuardPref);
|
||||
registry->RegisterDictionaryPref(kDeprecatedNativeFileSystemWriteGuardPref);
|
||||
#endif // !defined(OS_ANDROID)
|
||||
|
@ -974,7 +945,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
|||
}
|
||||
|
||||
PrefProvider::PrefProvider(PrefService* prefs,
|
||||
@@ -162,6 +164,10 @@ PrefProvider::PrefProvider(PrefService* prefs,
|
||||
@@ -163,6 +165,10 @@ PrefProvider::PrefProvider(PrefService* prefs,
|
||||
num_exceptions);
|
||||
}
|
||||
|
||||
|
@ -985,7 +956,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
|||
TRACE_EVENT_END1("startup", "PrefProvider::PrefProvider",
|
||||
"NumberOfExceptions", num_exceptions);
|
||||
}
|
||||
@@ -317,4 +323,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) {
|
||||
@@ -318,4 +324,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) {
|
||||
clock_ = clock;
|
||||
}
|
||||
|
||||
|
@ -1001,6 +972,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
|||
+
|
||||
} // namespace content_settings
|
||||
diff --git a/components/content_settings/core/browser/content_settings_pref_provider.h b/components/content_settings/core/browser/content_settings_pref_provider.h
|
||||
index 7c16ebc5e3..f5b24f76db 100644
|
||||
--- a/components/content_settings/core/browser/content_settings_pref_provider.h
|
||||
+++ b/components/content_settings/core/browser/content_settings_pref_provider.h
|
||||
@@ -63,6 +63,9 @@ class PrefProvider : public UserModifiableProvider {
|
||||
|
@ -1023,9 +995,10 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
|||
};
|
||||
|
||||
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
index 9281722b90..931aed181c 100644
|
||||
--- a/components/content_settings/core/browser/content_settings_registry.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
@@ -621,6 +621,18 @@ void ContentSettingsRegistry::Init() {
|
||||
@@ -598,6 +598,18 @@ void ContentSettingsRegistry::Init() {
|
||||
ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE,
|
||||
ContentSettingsInfo::PERSISTENT,
|
||||
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY);
|
||||
|
@ -1045,6 +1018,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.
|
|||
|
||||
void ContentSettingsRegistry::Register(
|
||||
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
index b462833a61..e3493a7ae2 100644
|
||||
--- a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
@@ -145,6 +145,13 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
|
@ -1062,9 +1036,10 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc
|
|||
|
||||
bool IsMorePermissive(ContentSetting a, ContentSetting b) {
|
||||
diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
|
||||
index 500a6da178..e39f388420 100644
|
||||
--- a/components/content_settings/core/browser/host_content_settings_map.cc
|
||||
+++ b/components/content_settings/core/browser/host_content_settings_map.cc
|
||||
@@ -618,6 +618,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) {
|
||||
@@ -586,6 +586,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) {
|
||||
provider->SetClockForTesting(clock);
|
||||
}
|
||||
|
||||
|
@ -1080,9 +1055,10 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map.
|
|||
auto* content_setting_registry =
|
||||
content_settings::ContentSettingsRegistry::GetInstance();
|
||||
diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h
|
||||
index 462e8a6b28..7194765853 100644
|
||||
--- a/components/content_settings/core/browser/host_content_settings_map.h
|
||||
+++ b/components/content_settings/core/browser/host_content_settings_map.h
|
||||
@@ -335,6 +335,9 @@ class HostContentSettingsMap : public content_settings::Observer,
|
||||
@@ -327,6 +327,9 @@ class HostContentSettingsMap : public content_settings::Observer,
|
||||
allow_invalid_secondary_pattern_for_testing_ = allow;
|
||||
}
|
||||
|
||||
|
@ -1093,17 +1069,18 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map.
|
|||
friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
|
||||
friend class content_settings::TestUtils;
|
||||
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
|
||||
index b76c3410b5..44edfd0284 100644
|
||||
--- a/components/content_settings/core/common/content_settings.cc
|
||||
+++ b/components/content_settings/core/common/content_settings.cc
|
||||
@@ -93,6 +93,7 @@ constexpr HistogramValue kHistogramValue[] = {
|
||||
{ContentSettingsType::FONT_ACCESS, 71},
|
||||
@@ -94,6 +94,7 @@ constexpr HistogramValue kHistogramValue[] = {
|
||||
{ContentSettingsType::PERMISSION_AUTOREVOCATION_DATA, 72},
|
||||
{ContentSettingsType::FILE_SYSTEM_LAST_PICKED_DIRECTORY, 73},
|
||||
+ {ContentSettingsType::TIMEZONE_OVERRIDE, 74},
|
||||
{ContentSettingsType::DISPLAY_CAPTURE, 74},
|
||||
+ //{ContentSettingsType::TIMEZONE_OVERRIDE, 75}, comment for again line 118 failed
|
||||
};
|
||||
|
||||
} // namespace
|
||||
@@ -179,7 +180,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
|
||||
@@ -180,7 +181,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
|
||||
content_type == ContentSettingsType::JAVASCRIPT ||
|
||||
content_type == ContentSettingsType::CLIENT_HINTS ||
|
||||
content_type == ContentSettingsType::POPUPS ||
|
||||
|
@ -1114,6 +1091,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
|
|||
|
||||
RendererContentSettingRules::RendererContentSettingRules() {}
|
||||
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
|
||||
index 5d2109d96d..96db50dbc8 100644
|
||||
--- a/components/content_settings/core/common/content_settings.h
|
||||
+++ b/components/content_settings/core/common/content_settings.h
|
||||
@@ -79,6 +79,8 @@ struct RendererContentSettingRules {
|
||||
|
@ -1126,6 +1104,7 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon
|
|||
|
||||
namespace content_settings {
|
||||
diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom
|
||||
index 7df2cdb732..3cd8c2efa2 100644
|
||||
--- a/components/content_settings/core/common/content_settings.mojom
|
||||
+++ b/components/content_settings/core/common/content_settings.mojom
|
||||
@@ -77,4 +77,6 @@ struct RendererContentSettingRules {
|
||||
|
@ -1136,6 +1115,7 @@ diff --git a/components/content_settings/core/common/content_settings.mojom b/co
|
|||
+ string timezone_override_value;
|
||||
};
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
index dae4b74aec..30ff993809 100644
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
@@ -100,7 +100,9 @@ bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
|
||||
|
@ -1150,6 +1130,7 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai
|
|||
|
||||
} // namespace mojo
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
index e58b9a6953..acabb350fa 100644
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
@@ -145,6 +145,16 @@ struct StructTraits<
|
||||
|
@ -1170,19 +1151,21 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai
|
|||
content_settings::mojom::RendererContentSettingRulesDataView data,
|
||||
RendererContentSettingRules* out);
|
||||
diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h
|
||||
index a7ea788112..0537569359 100644
|
||||
--- a/components/content_settings/core/common/content_settings_types.h
|
||||
+++ b/components/content_settings/core/common/content_settings_types.h
|
||||
@@ -229,6 +229,9 @@ enum class ContentSettingsType : int32_t {
|
||||
@@ -231,6 +231,9 @@ enum class ContentSettingsType : int32_t {
|
||||
// by the File System Access API.
|
||||
FILE_SYSTEM_LAST_PICKED_DIRECTORY,
|
||||
|
||||
+ // Content setting for timezone customization functionality.
|
||||
+ TIMEZONE_OVERRIDE,
|
||||
+
|
||||
NUM_TYPES,
|
||||
};
|
||||
|
||||
// Capture the current tab using getCurrentBrowsingContextMedia().
|
||||
// TODO(crbug.com/1150788): Apply this to getDisplayMedia() as well.
|
||||
// No values are stored for this type, this is solely needed to be able to
|
||||
diff --git a/components/content_settings/core/common/pref_names.cc b/components/content_settings/core/common/pref_names.cc
|
||||
index 8b4ebc8390..4352dc7775 100644
|
||||
--- a/components/content_settings/core/common/pref_names.cc
|
||||
+++ b/components/content_settings/core/common/pref_names.cc
|
||||
@@ -128,4 +128,7 @@ const char kQuietNotificationPermissionUiEnablingMethod[] =
|
||||
|
@ -1194,6 +1177,7 @@ diff --git a/components/content_settings/core/common/pref_names.cc b/components/
|
|||
+
|
||||
} // namespace prefs
|
||||
diff --git a/components/content_settings/core/common/pref_names.h b/components/content_settings/core/common/pref_names.h
|
||||
index 23533df766..2a070a8291 100644
|
||||
--- a/components/content_settings/core/common/pref_names.h
|
||||
+++ b/components/content_settings/core/common/pref_names.h
|
||||
@@ -71,6 +71,8 @@ extern const char kQuietNotificationPermissionUiEnablingMethod[];
|
||||
|
@ -1206,6 +1190,7 @@ diff --git a/components/content_settings/core/common/pref_names.h b/components/c
|
|||
|
||||
#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PREF_NAMES_H_
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
index b6b38ab9a2..bb3a88c917 100644
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -9,8 +9,10 @@
|
||||
|
@ -1239,7 +1224,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
|
|||
namespace content_settings {
|
||||
namespace {
|
||||
|
||||
@@ -368,6 +376,10 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
|
||||
@@ -362,6 +370,10 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
|
||||
allow = allow || IsAllowlistedForContentSettings();
|
||||
|
||||
cached_script_permissions_[frame] = allow;
|
||||
|
@ -1250,7 +1235,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
|
|||
return allow;
|
||||
}
|
||||
|
||||
@@ -498,4 +510,81 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
|
||||
@@ -486,4 +498,81 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1333,9 +1318,10 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
|
|||
+
|
||||
} // namespace content_settings
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
index f5f55e59b0..4dd01a342f 100644
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
@@ -178,6 +178,10 @@ class ContentSettingsAgentImpl
|
||||
@@ -177,6 +177,10 @@ class ContentSettingsAgentImpl
|
||||
|
||||
mojo::AssociatedReceiverSet<mojom::ContentSettingsAgent> receivers_;
|
||||
|
||||
|
@ -1346,19 +1332,3 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h
|
|||
DISALLOW_COPY_AND_ASSIGN(ContentSettingsAgentImpl);
|
||||
};
|
||||
|
||||
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/WebLayerSiteSettingsClient.java b/weblayer/browser/java/org/chromium/weblayer_private/WebLayerSiteSettingsClient.java
|
||||
--- a/weblayer/browser/java/org/chromium/weblayer_private/WebLayerSiteSettingsClient.java
|
||||
+++ b/weblayer/browser/java/org/chromium/weblayer_private/WebLayerSiteSettingsClient.java
|
||||
@@ -147,6 +147,9 @@ public class WebLayerSiteSettingsClient implements SiteSettingsClient, ManagedPr
|
||||
@Override
|
||||
public void launchProtectedContentHelpAndFeedbackActivity(Activity currentActivity) {}
|
||||
|
||||
+ @Override
|
||||
+ public void launchTimeZoneOverrideHelpAndFeedbackActivity(Activity currentActivity) {}
|
||||
+
|
||||
// WebappSettingsClient implementation:
|
||||
// A no-op since WebLayer doesn't support webapps.
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue