Release 94.0.4606.109
This commit is contained in:
parent
3129f5e2c2
commit
fb5839d5eb
8 changed files with 531 additions and 82 deletions
|
@ -1,3 +1,8 @@
|
|||
# 94.0.4606.109
|
||||
* experimental user scripts support (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/792)
|
||||
* Bromite auto-update notifications enabled by default
|
||||
* enable Android native autofill (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/547)
|
||||
|
||||
# 94.0.4606.102
|
||||
* add flag to disable pull-to-refresh effect
|
||||
* add recents, offlinepage and send to home screen for always incognito (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1182 and https://github.com/bromite/bromite/issues/1362)
|
||||
|
|
|
@ -1 +1 @@
|
|||
94.0.4606.102
|
||||
94.0.4606.109
|
||||
|
|
|
@ -161,5 +161,6 @@ Enable-share-intent.patch
|
|||
Site-setting-for-images.patch
|
||||
Bromite-auto-updater.patch
|
||||
Add-flag-to-disable-pull-to-refresh-effect.patch
|
||||
Experimental-user-scripts-support.patch
|
||||
Enable-native-Android-autofill.patch
|
||||
Automated-domain-substitution.patch
|
||||
experimental-user-scripts-support.patch
|
||||
|
|
|
@ -4239,7 +4239,7 @@ diff --git a/chrome/app/theme/PRESUBMIT.py b/chrome/app/theme/PRESUBMIT.py
|
|||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -323,14 +323,14 @@ const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = {
|
||||
@@ -324,14 +324,14 @@ const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = {
|
||||
const FeatureEntry::Choice kTraceUploadURL[] = {
|
||||
{flags_ui::kGenericExperimentChoiceDisabled, "", ""},
|
||||
{flag_descriptions::kTraceUploadUrlChoiceOther, switches::kTraceUploadURL,
|
||||
|
@ -4258,7 +4258,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|||
|
||||
const FeatureEntry::Choice kLiteVideoDefaultDownlinkBandwidthKbps[] = {
|
||||
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
|
||||
@@ -3712,7 +3712,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3713,7 +3713,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kSyncSandboxDescription, kOsAll,
|
||||
SINGLE_VALUE_TYPE_AND_VALUE(
|
||||
switches::kSyncServiceURL,
|
||||
|
@ -4267,7 +4267,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|||
#if !defined(OS_ANDROID)
|
||||
{"media-router-cast-allow-all-ips",
|
||||
flag_descriptions::kMediaRouterCastAllowAllIPsName,
|
||||
@@ -3920,7 +3920,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3921,7 +3921,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kSetMarketUrlForTestingName,
|
||||
flag_descriptions::kSetMarketUrlForTestingDescription, kOsAndroid,
|
||||
SINGLE_VALUE_TYPE_AND_VALUE(switches::kMarketUrlForTesting,
|
||||
|
@ -8203,7 +8203,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
|
||||
CHAR_LIMIT guidelines:
|
||||
Certain strings need character limits to prevent a long translation from breaking the UI.
|
||||
@@ -911,7 +911,7 @@ Privacy Sandbox trials are still in active development and are available in sele
|
||||
@@ -914,7 +914,7 @@ Privacy Sandbox trials are still in active development and are available in sele
|
||||
Choose another provider
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_SECURE_DROPDOWN_MODE_PRIVACY_POLICY" desc="Text that displays a link to the privacy policy of the resolver selected from a dropdown menu">
|
||||
|
@ -8212,7 +8212,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_SETTINGS_SECURE_DNS_DISABLED_FOR_MANAGED_ENVIRONMENT" desc="Substring of the secure DNS setting when secure DNS is disabled due to detection of a managed environment">
|
||||
This setting is disabled on managed browsers
|
||||
@@ -948,7 +948,7 @@ Privacy Sandbox trials are still in active development and are available in sele
|
||||
@@ -951,7 +951,7 @@ Privacy Sandbox trials are still in active development and are available in sele
|
||||
<message name="IDS_CLEAR_BROWSING_DATA_HISTORY_DIALOG_DATA_TEXT" desc="Text of the dialog that is shown after the deletion of browsing history items finished, indicating that the selected data has been removed, but there may be other forms of browsing history still present in user's Google account.">
|
||||
The selected data has been removed from Chrome and your synced devices.
|
||||
|
||||
|
@ -8221,7 +8221,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_CLEAR_CACHE_TITLE" desc="Title for Clear Cache in Clear Browsing Data dialog">
|
||||
Cached images and files
|
||||
@@ -991,10 +991,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -994,10 +994,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Record history even in incognito mode
|
||||
</message>
|
||||
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SIGNED_IN" desc="A text explaining other forms of activity for signed in users.">
|
||||
|
@ -8234,7 +8234,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_CLEAR_SEARCH_HISTORY_LINK" desc="Text informing the user that they can clear search history and other data using MyActivity.">
|
||||
<ph name="BEGIN_LINK1"><link1></ph>Search history<ph name="END_LINK1"></link1></ph> and <ph name="BEGIN_LINK2"><link2></ph>other forms of activity<ph name="END_LINK2"></link2></ph> may be saved in your Google Account when you’re signed in. You can delete them anytime.
|
||||
@@ -1063,7 +1063,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1066,7 +1066,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Basic
|
||||
</message>
|
||||
<message name="IDS_ANDROID_HISTORY_OTHER_FORMS_OF_HISTORY" desc="The notification at the top of the history page indicating that deleting Chrome browsing history will not delete other forms of history stored at Google My Activity.">
|
||||
|
@ -8243,7 +8243,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_ANDROID_HISTORY_BLOCKED_SITE" desc="The text displayed in the history page indicating that a visit to a web site was blocked due to an administrator policy.">
|
||||
Blocked site
|
||||
@@ -1485,7 +1485,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1488,7 +1488,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
In Lite mode, Chrome loads pages faster and uses up to 60 percent less data. To optimize the pages that you visit, Chrome sends your web traffic to Google. <ph name="BEGIN_LINK"><link></ph>Learn more<ph name="END_LINK"></link></ph>
|
||||
</message>
|
||||
<message name="IDS_DATA_REDUCTION_PROMO_LEARN_MORE_URL" desc="URL for Lite mode help center article" translateable="false">
|
||||
|
@ -8252,7 +8252,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_DATA_REDUCTION_ENABLE_BUTTON_LITE_MODE" desc="Button the user presses if they want to enable Lite mode" >
|
||||
Turn on Lite mode
|
||||
@@ -1686,10 +1686,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1689,10 +1689,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Waiting for details of parents.
|
||||
</message>
|
||||
<message name="IDS_ACCOUNT_MANAGEMENT_ONE_PARENT_NAME" desc="String for name of single parent for child account.">
|
||||
|
@ -8265,7 +8265,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_ACCOUNT_MANAGEMENT_CHILD_CONTENT_TITLE" desc="Title of the Content setting, which controls which websites a child is allowed to visit.">
|
||||
Content
|
||||
@@ -1748,22 +1748,22 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1751,22 +1751,22 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Google Terms of Service
|
||||
</message>
|
||||
<message name="IDS_GOOGLE_TERMS_OF_SERVICE_URL" desc="URL for Google terms of service" translateable="false">
|
||||
|
@ -8292,7 +8292,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
|
||||
<!-- Sign-in strings -->
|
||||
@@ -1780,7 +1780,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1783,7 +1783,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Also clear your Chrome data from this device
|
||||
</message>
|
||||
<message name="IDS_SIGNOUT_MANAGED_ACCOUNT_MESSAGE" desc="Message to display for sign out of Chrome dialog when the account has enterprise management, and all user data will be erased">
|
||||
|
@ -8301,7 +8301,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_SIGN_IN_GETTING_ACCOUNT_MANAGEMENT_POLICY" desc="Title of progress bar dialog for getting management policy">
|
||||
Contacting Google. This may take a minute…
|
||||
@@ -1885,7 +1885,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1888,7 +1888,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Your data was encrypted with your <ph name="BEGIN_LINK"><learnmore></ph>sync passphrase<ph name="END_LINK"></learnmore></ph> on <ph name="TIME">%1$s<ex>Sept 1, 2012</ex></ph>. Enter it to start sync.
|
||||
</message>
|
||||
<message name="IDS_SYNC_ACCOUNT_INFO" desc="The message that appears in the options dialog indicating that the user is signed in with the given email address.">
|
||||
|
@ -8310,7 +8310,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_SYNC_PASSPHRASE_CANNOT_BE_BLANK" desc="Inform user that they cannot use a blank password [CHAR_LIMIT=40]">
|
||||
This field cannot be blank
|
||||
@@ -3927,7 +3927,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3930,7 +3930,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
|
||||
<!-- WebUsb Picker UI strings -->
|
||||
<message name="IDS_USB_CHOOSER_DIALOG_PROMPT" desc="The text that is used to introduce the USB chooser dialog to the user.">
|
||||
|
@ -8319,7 +8319,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_USB_CHOOSER_DIALOG_NO_DEVICES_FOUND_PROMPT" desc="The label shown to the user to inform them that no USB devices were found matching the requirements that the application provided.">
|
||||
No compatible devices found
|
||||
@@ -3961,7 +3961,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3964,7 +3964,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Running in Chrome
|
||||
</message>
|
||||
<message name="IDS_TWA_RUNNING_IN_CHROME_V2" desc="Updated message on a snackbar indicating that the current Activity may use Chrome data (the rest of the app may not be).">
|
||||
|
@ -8328,7 +8328,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_GOT_IT" desc="Button for the user to accept a disclosure/message">
|
||||
Got it
|
||||
@@ -4321,7 +4321,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4324,7 +4324,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Sending to <ph name="device_name">%1$s<ex>Tanya's Pixel 2</ex></ph>...
|
||||
</message>
|
||||
<message name="IDS_SEND_TAB_TO_SELF_NOTIFICATION_CONTEXT_TEXT" desc="Text displayed as the second line of a notification indicating the domain and the device the tab is shared from.">
|
||||
|
|
|
@ -111,7 +111,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/
|
|||
+ (ChromeSwitchPreference) findPreference(PREF_ALLOW_INLINE_UPDATE);
|
||||
+ allowInlineUpdate.setChecked(
|
||||
+ OmahaBase.getSharedPreferences()
|
||||
+ .getBoolean(OmahaBase.PREF_ALLOW_INLINE_UPDATE, false));
|
||||
+ .getBoolean(OmahaBase.PREF_ALLOW_INLINE_UPDATE, true));
|
||||
+ allowInlineUpdate.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ new file mode 100644
|
|||
+
|
||||
+ private void pullCurrentState() {
|
||||
+ if (OmahaBase.getSharedPreferences()
|
||||
+ .getBoolean(OmahaBase.PREF_ALLOW_INLINE_UPDATE, false) == false) {
|
||||
+ .getBoolean(OmahaBase.PREF_ALLOW_INLINE_UPDATE, true) == false) {
|
||||
+ Log.i(TAG, "BromiteUpdater: disabled by user");
|
||||
+ return;
|
||||
+ }
|
||||
|
|
490
build/patches/Enable-native-Android-autofill.patch
Normal file
490
build/patches/Enable-native-Android-autofill.patch
Normal file
|
@ -0,0 +1,490 @@
|
|||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Sun, 24 Oct 2021 16:54:04 +0000
|
||||
Subject: Enable native Android autofill
|
||||
|
||||
There are 2 different types of autofill: one managed via GCM and the
|
||||
native Android one that uses the provider assigned by the user
|
||||
(which can be any user installed app like Bitwarden for example).
|
||||
In chromium GCM is active while in the WebView the latter.
|
||||
This patch uses the WebView code to activate native Android autofill.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/547
|
||||
---
|
||||
chrome/android/BUILD.gn | 1 +
|
||||
.../settings/PasswordSettings.java | 58 ++++++++++++++++++-
|
||||
.../chromium/chrome/browser/tab/TabImpl.java | 43 ++++++++++++++
|
||||
.../browser/tab/TabViewAndroidDelegate.java | 14 +++++
|
||||
chrome/browser/BUILD.gn | 8 +++
|
||||
chrome/browser/android/tab_android.cc | 26 +++++++++
|
||||
chrome/browser/android/tab_android.h | 2 +
|
||||
.../strings/android_chrome_strings.grd | 3 +
|
||||
chrome/browser/ui/tab_helpers.cc | 6 +-
|
||||
.../autofill/core/common/autofill_prefs.cc | 5 ++
|
||||
.../autofill/core/common/autofill_prefs.h | 1 +
|
||||
.../embedder_support/view/ContentView.java | 48 +++++++++++++++
|
||||
.../chromium/ui/base/ViewAndroidDelegate.java | 8 +++
|
||||
13 files changed, 221 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
+++ b/chrome/android/BUILD.gn
|
||||
@@ -410,6 +410,7 @@ android_library("chrome_java") {
|
||||
"//chrome/browser/xsurface:java",
|
||||
"//components/autofill/android:autofill_java",
|
||||
"//components/autofill_assistant/browser:proto_java",
|
||||
+ "//components/android_autofill/browser:java",
|
||||
"//components/background_task_scheduler:background_task_scheduler_java",
|
||||
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
|
||||
"//components/bookmarks/common/android:bookmarks_java",
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
@@ -52,12 +52,18 @@ import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar;
|
||||
+import org.chromium.chrome.browser.ApplicationLifetime;
|
||||
+
|
||||
/**
|
||||
* The "Passwords" screen in Settings, which allows the user to enable or disable password saving,
|
||||
* to view saved passwords (just the username and URL), and to delete saved passwords.
|
||||
*/
|
||||
public class PasswordSettings extends PreferenceFragmentCompat
|
||||
- implements PasswordManagerHandler.PasswordListObserver, Preference.OnPreferenceClickListener {
|
||||
+ implements PasswordManagerHandler.PasswordListObserver, Preference.OnPreferenceClickListener,
|
||||
+ INeedSnackbarManager {
|
||||
// Keys for name/password dictionaries.
|
||||
public static final String PASSWORD_LIST_URL = "url";
|
||||
public static final String PASSWORD_LIST_NAME = "name";
|
||||
@@ -75,6 +81,10 @@ public class PasswordSettings extends PreferenceFragmentCompat
|
||||
public static final String PREF_TRUSTED_VAULT_OPT_IN = "trusted_vault_opt_in";
|
||||
public static final String PREF_KEY_MANAGE_ACCOUNT_LINK = "manage_account_link";
|
||||
public static final String PREF_KEY_SECURITY_KEY_LINK = "security_key_link";
|
||||
+ public static final String PREF_ANDROID_AUTOFILL_SWITCH = "android_autofill_switch";
|
||||
+
|
||||
+ private SnackbarManager mSnackbarManager;
|
||||
+ private Snackbar mSnackbar;
|
||||
|
||||
// A PasswordEntryViewer receives a boolean value with this key. If set true, the the entry was
|
||||
|
||||
@@ -110,6 +120,7 @@ public class PasswordSettings extends PreferenceFragmentCompat
|
||||
private Preference mLinkPref;
|
||||
private Preference mSecurityKey;
|
||||
private ChromeSwitchPreference mSavePasswordsSwitch;
|
||||
+ private ChromeSwitchPreference mEnableAndroidAutofillSwitch;
|
||||
private ChromeSwitchPreference mAutoSignInSwitch;
|
||||
private ChromeBasePreference mCheckPasswords;
|
||||
private ChromeBasePreference mTrustedVaultOptIn;
|
||||
@@ -274,6 +285,7 @@ public class PasswordSettings extends PreferenceFragmentCompat
|
||||
getPreferenceScreen().removeAll();
|
||||
if (mSearchQuery == null) {
|
||||
createSavePasswordsSwitch();
|
||||
+ createEnableAndroidAutofillSwitch();
|
||||
createAutoSignInCheckbox();
|
||||
if (mPasswordCheck != null) {
|
||||
createCheckPasswords();
|
||||
@@ -517,6 +529,50 @@ public class PasswordSettings extends PreferenceFragmentCompat
|
||||
getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE));
|
||||
}
|
||||
|
||||
+ private void createEnableAndroidAutofillSwitch() {
|
||||
+ if (mSnackbar == null) {
|
||||
+ mSnackbar = Snackbar.make(getActivity().getString(R.string.ui_relaunch_notice),
|
||||
+ new SnackbarManager.SnackbarController() {
|
||||
+ @Override
|
||||
+ public void onDismissNoAction(Object actionData) { }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onAction(Object actionData) {
|
||||
+ ApplicationLifetime.terminate(true);
|
||||
+ }
|
||||
+ }, Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_UNKNOWN)
|
||||
+ .setSingleLine(false)
|
||||
+ .setAction(getActivity().getString(R.string.relaunch),
|
||||
+ /*actionData*/null)
|
||||
+ .setDuration(/*durationMs*/70000);
|
||||
+ }
|
||||
+
|
||||
+ mEnableAndroidAutofillSwitch = new ChromeSwitchPreference(getStyledContext(), null);
|
||||
+ mEnableAndroidAutofillSwitch.setKey(PREF_ANDROID_AUTOFILL_SWITCH);
|
||||
+ mEnableAndroidAutofillSwitch.setTitle(R.string.enable_android_autofill);
|
||||
+ mEnableAndroidAutofillSwitch.setOrder(ORDER_SWITCH);
|
||||
+ mEnableAndroidAutofillSwitch.setSummaryOn(R.string.text_on);
|
||||
+ mEnableAndroidAutofillSwitch.setSummaryOff(R.string.text_off);
|
||||
+
|
||||
+ try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) {
|
||||
+ getPreferenceScreen().addPreference(mEnableAndroidAutofillSwitch);
|
||||
+ }
|
||||
+
|
||||
+ mEnableAndroidAutofillSwitch.setChecked(
|
||||
+ getPrefService().getBoolean(Pref.AUTOFILL_ANDROID_ENABLED));
|
||||
+
|
||||
+ mEnableAndroidAutofillSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ getPrefService().setBoolean(Pref.AUTOFILL_ANDROID_ENABLED, (boolean) newValue);
|
||||
+ if (!mSnackbarManager.isShowing())
|
||||
+ mSnackbarManager.showSnackbar(mSnackbar);
|
||||
+ return true;
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ public void setSnackbarManager(SnackbarManager manager) {
|
||||
+ mSnackbarManager = manager;
|
||||
+ }
|
||||
+
|
||||
private void createAutoSignInCheckbox() {
|
||||
mAutoSignInSwitch = new ChromeSwitchPreference(getStyledContext(), null);
|
||||
mAutoSignInSwitch.setKey(PREF_AUTOSIGNIN_SWITCH);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
@@ -72,6 +72,18 @@ import org.chromium.url.GURL;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
+import android.os.Build;
|
||||
+import android.util.SparseArray;
|
||||
+import org.chromium.base.annotations.VerifiesOnO;
|
||||
+import org.chromium.ui.base.EventOffsetHandler;
|
||||
+import android.view.ViewStructure;
|
||||
+import android.view.autofill.AutofillValue;
|
||||
+import org.chromium.components.autofill.AutofillProvider;
|
||||
+import org.chromium.components.autofill.AutofillActionModeCallback;
|
||||
+import org.chromium.content_public.browser.SelectionPopupController;
|
||||
+import org.chromium.chrome.browser.preferences.Pref;
|
||||
+import org.chromium.components.user_prefs.UserPrefs;
|
||||
+
|
||||
/**
|
||||
* Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}.
|
||||
* This class is not intended to be extended.
|
||||
@@ -215,6 +227,8 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
|
||||
/** Whether or not the user manually changed the user agent. */
|
||||
private boolean mUserForcedUserAgent;
|
||||
|
||||
+ AutofillProvider mAutofillProvider;
|
||||
+
|
||||
/**
|
||||
* Creates an instance of a {@link TabImpl}.
|
||||
*
|
||||
@@ -765,6 +779,11 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
|
||||
for (TabObserver observer : mObservers) observer.onDestroyed(this);
|
||||
mObservers.clear();
|
||||
|
||||
+ if (mAutofillProvider != null) {
|
||||
+ mAutofillProvider.destroy();
|
||||
+ mAutofillProvider = null;
|
||||
+ }
|
||||
+
|
||||
mUserDataHost.destroy();
|
||||
mTabViewManager.destroy();
|
||||
hideNativePage(false, null);
|
||||
@@ -1356,6 +1375,16 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
|
||||
return tabsPtrArray;
|
||||
}
|
||||
|
||||
+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
|
||||
+ if (mAutofillProvider != null)
|
||||
+ mAutofillProvider.onProvideAutoFillVirtualStructure(structure, flags);
|
||||
+ }
|
||||
+
|
||||
+ public void autofill(final SparseArray<AutofillValue> values) {
|
||||
+ if (mAutofillProvider != null)
|
||||
+ mAutofillProvider.autofill(values);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Initializes the {@link WebContents}. Completes the browser content components initialization
|
||||
* around a native WebContents pointer.
|
||||
@@ -1405,6 +1434,19 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
|
||||
mDelegateFactory.createContextMenuPopulatorFactory(this), this));
|
||||
|
||||
mWebContents.notifyRendererPreferenceUpdate();
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
+ UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
+ .getBoolean(Pref.AUTOFILL_ANDROID_ENABLED) == true) {
|
||||
+ SelectionPopupController selectionController =
|
||||
+ SelectionPopupController.fromWebContents(mWebContents);
|
||||
+
|
||||
+ mAutofillProvider = new AutofillProvider(getContext(), cv, webContents, "bromite");
|
||||
+ TabImplJni.get().initializeAutofillIfNecessary(mNativeTabAndroid);
|
||||
+ mAutofillProvider.setWebContents(webContents);
|
||||
+ cv.setWebContents(webContents);
|
||||
+ selectionController.setNonSelectionActionModeCallback(
|
||||
+ new AutofillActionModeCallback(mThemedApplicationContext, mAutofillProvider));
|
||||
+ }
|
||||
TabHelpers.initWebContentsHelpers(this);
|
||||
notifyContentChanged();
|
||||
} finally {
|
||||
@@ -1765,5 +1807,6 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
|
||||
void setActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url, String title);
|
||||
void loadOriginalImage(long nativeTabAndroid);
|
||||
boolean handleNonNavigationAboutURL(GURL url);
|
||||
+ void initializeAutofillIfNecessary(long nativeTabAndroid);
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
|
||||
@@ -14,6 +14,10 @@ import org.chromium.content_public.browser.RenderWidgetHostView;
|
||||
import org.chromium.ui.base.ViewAndroidDelegate;
|
||||
import org.chromium.ui.base.WindowAndroid;
|
||||
|
||||
+import android.util.SparseArray;
|
||||
+import android.view.autofill.AutofillValue;
|
||||
+import android.view.ViewStructure;
|
||||
+
|
||||
/**
|
||||
* Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome.
|
||||
*/
|
||||
@@ -101,4 +105,14 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate {
|
||||
protected int getViewportInsetBottom() {
|
||||
return mApplicationViewportInsetBottomPx;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
|
||||
+ mTab.onProvideAutofillVirtualStructure(structure, flags);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void autofill(final SparseArray<AutofillValue> values) {
|
||||
+ mTab.autofill(values);
|
||||
+ }
|
||||
}
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2352,6 +2352,14 @@ static_library("browser") {
|
||||
"//ui/webui/resources/cr_components/customize_themes:mojom",
|
||||
"//ui/webui/resources/cr_components/most_visited:mojom",
|
||||
]
|
||||
+
|
||||
+ if (is_android) {
|
||||
+ deps += [
|
||||
+ "//components/android_autofill/browser",
|
||||
+ "//components/android_autofill/browser:android"
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
if (is_chromeos_ash) {
|
||||
testonly = enable_weston_test
|
||||
sources += [
|
||||
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
|
||||
--- a/chrome/browser/android/tab_android.cc
|
||||
+++ b/chrome/browser/android/tab_android.cc
|
||||
@@ -65,6 +65,13 @@
|
||||
#include "url/android/gurl_android.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
+#include "components/android_autofill/browser/android_autofill_manager.h"
|
||||
+#include "components/android_autofill/browser/autofill_provider.h"
|
||||
+#include "components/android_autofill/browser/autofill_provider_android.h"
|
||||
+#include "components/autofill/content/browser/content_autofill_driver_factory.h"
|
||||
+#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
+
|
||||
using base::android::AttachCurrentThread;
|
||||
using base::android::ConvertUTF8ToJavaString;
|
||||
using base::android::JavaParamRef;
|
||||
@@ -437,3 +444,22 @@ static void JNI_TabImpl_Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
|
||||
// This will automatically bind to the Java object and pass ownership there.
|
||||
new TabAndroid(env, obj);
|
||||
}
|
||||
+
|
||||
+void TabAndroid::InitializeAutofillIfNecessary(JNIEnv* env) {
|
||||
+ if (!autofill::ContentAutofillDriverFactory::FromWebContents(
|
||||
+ web_contents_.get())) {
|
||||
+ content::WebContents* web_contents = web_contents_.get();
|
||||
+ DCHECK(
|
||||
+ !autofill::ContentAutofillDriverFactory::FromWebContents(web_contents));
|
||||
+ DCHECK(autofill::AutofillProvider::FromWebContents(web_contents));
|
||||
+
|
||||
+ autofill::ChromeAutofillClient::CreateForWebContents(web_contents);
|
||||
+
|
||||
+ autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(
|
||||
+ web_contents,
|
||||
+ autofill::ChromeAutofillClient::FromWebContents(web_contents),
|
||||
+ g_browser_process->GetApplicationLocale(),
|
||||
+ autofill::BrowserAutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER,
|
||||
+ base::BindRepeating(&autofill::AndroidAutofillManager::Create));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
|
||||
--- a/chrome/browser/android/tab_android.h
|
||||
+++ b/chrome/browser/android/tab_android.h
|
||||
@@ -150,6 +150,8 @@ class TabAndroid : public base::SupportsUserData {
|
||||
|
||||
void SetDevToolsAgentHost(scoped_refptr<content::DevToolsAgentHost> host);
|
||||
|
||||
+ void InitializeAutofillIfNecessary(JNIEnv* env);
|
||||
+
|
||||
private:
|
||||
JavaObjectWeakGlobalRef weak_java_tab_;
|
||||
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -558,6 +558,9 @@ CHAR_LIMIT guidelines:
|
||||
<message name="IDS_PASSWORD_SETTINGS_SAVE_PASSWORDS" desc="Title for the checkbox toggling whether passwords are saved or not. [CHAR_LIMIT=32]">
|
||||
Save passwords
|
||||
</message>
|
||||
+ <message name="IDS_ENABLE_ANDROID_AUTOFILL" desc="Title for the checkbox toggling whether enable Android native autofill or not. [CHAR_LIMIT=32]">
|
||||
+ Enable native Android autofill
|
||||
+ </message>
|
||||
<message name="IDS_PASSWORDS_AUTO_SIGNIN_TITLE" desc="Title for checkbox to enable automatically signing the user in to websites">
|
||||
Auto Sign-in
|
||||
</message>
|
||||
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -125,6 +125,9 @@
|
||||
#include "chrome/browser/ui/android/context_menu_helper.h"
|
||||
#include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h"
|
||||
#include "chrome/browser/video_tutorials/video_tutorial_tab_helper.h"
|
||||
+#include "components/android_autofill/browser/android_autofill_manager.h"
|
||||
+#include "components/android_autofill/browser/autofill_provider.h"
|
||||
+#include "components/android_autofill/browser/autofill_provider_android.h"
|
||||
#else
|
||||
#include "chrome/browser/accuracy_tips/accuracy_service_factory.h"
|
||||
#include "chrome/browser/banners/app_banner_manager_desktop.h"
|
||||
@@ -244,7 +247,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
web_contents,
|
||||
autofill::ChromeAutofillClient::FromWebContents(web_contents),
|
||||
g_browser_process->GetApplicationLocale(),
|
||||
- autofill::BrowserAutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
|
||||
+ autofill::BrowserAutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER,
|
||||
+ base::BindRepeating(&autofill::AndroidAutofillManager::Create));
|
||||
chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents);
|
||||
ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
|
||||
web_contents,
|
||||
diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
|
||||
--- a/components/autofill/core/common/autofill_prefs.cc
|
||||
+++ b/components/autofill/core/common/autofill_prefs.cc
|
||||
@@ -135,6 +135,9 @@ const char kAutofillWalletImportStorageCheckboxState[] =
|
||||
const char kAutocompleteLastVersionRetentionPolicy[] =
|
||||
"autocomplete.retention_policy_last_version";
|
||||
|
||||
+// Boolean that is true to enable native Android Autofill
|
||||
+const char kAutofillAndroidEnabled[] = "autofill.android_autofill_enabled";
|
||||
+
|
||||
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
// Synced prefs. Used for cross-device choices, e.g., credit card Autofill.
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -167,6 +170,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true);
|
||||
#endif
|
||||
+ registry->RegisterBooleanPref(
|
||||
+ prefs::kAutofillAndroidEnabled, true);
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kAutofillCreditCardSigninPromoImpressionCount, 0);
|
||||
registry->RegisterBooleanPref(prefs::kAutofillWalletImportEnabled, true);
|
||||
diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autofill/core/common/autofill_prefs.h
|
||||
--- a/components/autofill/core/common/autofill_prefs.h
|
||||
+++ b/components/autofill/core/common/autofill_prefs.h
|
||||
@@ -48,6 +48,7 @@ extern const char kAutofillUploadEventsLastResetTimestamp[];
|
||||
extern const char kAutofillWalletImportEnabled[];
|
||||
extern const char kAutofillWalletImportStorageCheckboxState[];
|
||||
extern const char kAutocompleteLastVersionRetentionPolicy[];
|
||||
+extern const char kAutofillAndroidEnabled[];
|
||||
|
||||
namespace sync_transport_opt_in {
|
||||
enum Flags {
|
||||
diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java
|
||||
--- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java
|
||||
+++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java
|
||||
@@ -36,6 +36,12 @@ import org.chromium.content_public.browser.WebContentsAccessibility;
|
||||
import org.chromium.ui.base.EventForwarder;
|
||||
import org.chromium.ui.base.EventOffsetHandler;
|
||||
|
||||
+import org.chromium.base.Log;
|
||||
+import org.chromium.base.annotations.VerifiesOnO;
|
||||
+import android.util.SparseArray;
|
||||
+import android.view.autofill.AutofillValue;
|
||||
+import org.chromium.ui.base.ViewAndroidDelegate;
|
||||
+
|
||||
/**
|
||||
* The containing view for {@link WebContents} that exists in the Android UI hierarchy and exposes
|
||||
* the various {@link View} functionality to it.
|
||||
@@ -82,6 +88,8 @@ public class ContentView extends FrameLayout
|
||||
*/
|
||||
public static ContentView createContentView(Context context,
|
||||
@Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) {
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
+ return new ContentViewWithAutofill(context, eventOffsetHandler, webContents);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
return new ContentViewApi23(context, eventOffsetHandler, webContents);
|
||||
}
|
||||
@@ -549,4 +557,44 @@ public class ContentView extends FrameLayout
|
||||
if (wcax != null) wcax.onProvideVirtualStructure(structure, false);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * API level 26 implementation that includes autofill.
|
||||
+ */
|
||||
+ @VerifiesOnO
|
||||
+ public static class ContentViewWithAutofill extends ContentViewApi23 {
|
||||
+ private ViewAndroidDelegate viewAndroidDelegate;
|
||||
+
|
||||
+ private ContentViewWithAutofill(Context context, EventOffsetHandler eventOffsetHandler, WebContents webContents) {
|
||||
+ super(context, eventOffsetHandler, webContents);
|
||||
+
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
+ // The Autofill system-level infrastructure has heuristics for which Views it considers
|
||||
+ // important for autofill; only these Views will be queried for their autofill
|
||||
+ // structure on notifications that a new (virtual) View was entered. By default,
|
||||
+ // FrameLayout is not considered important for autofill. Thus, for ContentView to be
|
||||
+ // queried for its autofill structure, we must explicitly inform the autofill system
|
||||
+ // that this View is important for autofill.
|
||||
+ setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_YES);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setWebContents(WebContents webContents) {
|
||||
+ viewAndroidDelegate = webContents.getViewAndroidDelegate();
|
||||
+ super.setWebContents(webContents);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
|
||||
+ if (viewAndroidDelegate != null)
|
||||
+ viewAndroidDelegate.onProvideAutofillVirtualStructure(structure, flags);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void autofill(final SparseArray<AutofillValue> values) {
|
||||
+ if (viewAndroidDelegate != null)
|
||||
+ viewAndroidDelegate.autofill(values);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
||||
--- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
||||
+++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
|
||||
@@ -26,6 +26,10 @@ import org.chromium.base.annotations.JNINamespace;
|
||||
import org.chromium.base.compat.ApiHelperForN;
|
||||
import org.chromium.ui.mojom.CursorType;
|
||||
|
||||
+import android.util.SparseArray;
|
||||
+import android.view.autofill.AutofillValue;
|
||||
+import android.view.ViewStructure;
|
||||
+
|
||||
/**
|
||||
* Class to acquire, position, and remove anchor views from the implementing View.
|
||||
*/
|
||||
@@ -488,4 +492,8 @@ public class ViewAndroidDelegate {
|
||||
protected int[] getDisplayFeature() {
|
||||
return null;
|
||||
}
|
||||
+
|
||||
+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {}
|
||||
+
|
||||
+ public void autofill(final SparseArray<AutofillValue> values) {}
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -2,28 +2,25 @@ From: uazo <uazo@users.noreply.github.com>
|
|||
Date: Fri, 13 Aug 2021 17:10:47 +0000
|
||||
Subject: Experimental user scripts support
|
||||
|
||||
Activate userscripts as in the desktop version
|
||||
of chromium.
|
||||
Activate the user scripts functionality for Android,
|
||||
as it is available in the Desktop version.
|
||||
|
||||
is possible to add them in two ways: by selecting
|
||||
files from the picker in the settings or downloading
|
||||
the scripts and opening it from downloads
|
||||
(only if ends with .user.js)
|
||||
It is possible to add user scripts in two ways: by
|
||||
selecting files from the picker in the settings or
|
||||
downloading the scripts and opening them from downloads
|
||||
(only if such files end with '.user.js').
|
||||
|
||||
new imported scripts are disabled by default: they
|
||||
can be activated via the ui.
|
||||
New imported scripts are disabled by default: they
|
||||
can be activated via the UI.
|
||||
|
||||
enabled headers are: name, version, description,
|
||||
Parsed user script headers are: name, version, description,
|
||||
include, exclude, match, exclude_match (only http and
|
||||
https), run-at (document-start, document-end,
|
||||
https), run-at (document-start, document-end,
|
||||
document-idle), homepage, url_source
|
||||
|
||||
ui, among other things, allows you to see the source
|
||||
of the script.
|
||||
The UI also allows you to see the source of the script.
|
||||
|
||||
needs add-support-for-ISupportHelpAndFeedback.patch
|
||||
|
||||
see also: README.md
|
||||
See also: components/user_scripts/README.md
|
||||
---
|
||||
chrome/android/BUILD.gn | 5 +
|
||||
.../android/java/res/xml/main_preferences.xml | 5 +
|
||||
|
@ -273,7 +270,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo
|
|||
|
||||
import java.io.File;
|
||||
|
||||
@@ -400,6 +401,11 @@ public class DownloadUtils {
|
||||
@@ -414,6 +415,11 @@ public class DownloadUtils {
|
||||
public static boolean openFile(String filePath, String mimeType, String downloadGuid,
|
||||
OTRProfileID otrProfileID, String originalUrl, String referrer,
|
||||
@DownloadOpenSource int source, Context context) {
|
||||
|
@ -348,7 +345,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|||
#include "components/version_info/version_info.h"
|
||||
#include "components/viz/common/features.h"
|
||||
#include "components/viz/common/switches.h"
|
||||
@@ -6387,6 +6388,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -6386,6 +6387,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kUserDataSnapshot)},
|
||||
#endif
|
||||
|
||||
|
@ -375,7 +372,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
|||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -5239,6 +5239,11 @@ const char kUserDataSnapshotDescription[] =
|
||||
@@ -5249,6 +5249,11 @@ const char kUserDataSnapshotDescription[] =
|
||||
"update and restoring them after a version rollback.";
|
||||
#endif // !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
|
@ -390,7 +387,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
|||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -3046,6 +3046,9 @@ extern const char kUserDataSnapshotName[];
|
||||
@@ -3052,6 +3052,9 @@ extern const char kUserDataSnapshotName[];
|
||||
extern const char kUserDataSnapshotDescription[];
|
||||
#endif // !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 17 May 2021 12:30:12 +0000
|
||||
Subject: Add support for ISupportHelpAndFeedback
|
||||
|
||||
---
|
||||
.../chrome/browser/settings/SettingsActivity.java | 10 +++++++---
|
||||
.../components/browser_ui/settings/SettingsUtils.java | 4 ++++
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
@@ -282,9 +282,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.menu_id_general_help) {
|
||||
- HelpAndFeedbackLauncherImpl.getInstance().show(this,
|
||||
- getString(R.string.help_context_settings), Profile.getLastUsedRegularProfile(),
|
||||
- null);
|
||||
+ if (mainFragment instanceof SettingsUtils.ISupportHelpAndFeedback) {
|
||||
+ ((SettingsUtils.ISupportHelpAndFeedback)mainFragment).onHelpAndFeebackPressed();
|
||||
+ } else {
|
||||
+ HelpAndFeedbackLauncherImpl.getInstance().show(this,
|
||||
+ getString(R.string.help_context_settings), Profile.getLastUsedRegularProfile(),
|
||||
+ null);
|
||||
+ }
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
--- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
+++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
@@ -126,4 +126,8 @@ public class SettingsUtils {
|
||||
ImageView imageButton = (ImageView) button;
|
||||
return imageButton.getDrawable() == parentMenu.getOverflowIcon();
|
||||
}
|
||||
+
|
||||
+ public interface ISupportHelpAndFeedback {
|
||||
+ void onHelpAndFeebackPressed();
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
Loading…
Add table
Reference in a new issue