123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- From: csagan5 <32685696+csagan5@users.noreply.github.com>
- Date: Sat, 9 May 2020 08:33:15 +0200
- Subject: Add a flag to allow screenshots in Incognito mode
- See also:
- * https://github.com/bromite/bromite/issues/551
- * https://bugs.chromium.org/p/chromium/issues/detail?id=920762
- ---
- chrome/browser/about_flags.cc | 6 ++++++
- chrome/browser/flag_descriptions.cc | 5 +++++
- chrome/browser/flag_descriptions.h | 3 +++
- .../flags/android/java_templates/ChromeSwitches.java.tmpl | 4 ----
- chrome/common/chrome_switches.cc | 3 +++
- chrome/common/chrome_switches.h | 1 +
- 6 files changed, 18 insertions(+), 4 deletions(-)
- 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
- @@ -7538,6 +7538,12 @@ const FeatureEntry kFeatureEntries[] = {
- "AndroidDynamicColor")},
- #endif // defined(OS_ANDROID)
-
- +#if defined(OS_ANDROID)
- + {switches::kEnableIncognitoSnapshotsInAndroidRecents, flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsName,
- + flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsDescription, kOsAndroid,
- + SINGLE_VALUE_TYPE(switches::kEnableIncognitoSnapshotsInAndroidRecents)},
- +#endif
- +
- #if defined(OS_WIN)
- {"win-10-tab-search-caption-button",
- flag_descriptions::kWin10TabSearchCaptionButtonName,
- 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
- @@ -712,6 +712,11 @@ const char kEnableAutofillCreditCardAuthenticationDescription[] =
- "authenticator (if available) to verify card ownership when retrieving "
- "credit cards from Google Payments.";
-
- +const char kEnableIncognitoSnapshotsInAndroidRecentsName[] =
- + "Enable Incognito snapshots in Android Recents";
- +const char kEnableIncognitoSnapshotsInAndroidRecentsDescription[] =
- + "Enable the secure flag for Incognito tabs which prevent taking screenshots and seeing snapshots in Android Recents.";
- +
- const char
- kEnableAutofillInfoBarAccountIndicationFooterForSingleAccountUsersName[] =
- "Display InfoBar footers with account indication information for "
- 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
- @@ -446,6 +446,9 @@ extern const char kEnableAutofillSaveCardInfoBarAccountIndicationFooterName[];
- extern const char
- kEnableAutofillSaveCardInfoBarAccountIndicationFooterDescription[];
-
- +extern const char kEnableIncognitoSnapshotsInAndroidRecentsName[];
- +extern const char kEnableIncognitoSnapshotsInAndroidRecentsDescription[];
- +
- extern const char kEnableExperimentalCookieFeaturesName[];
- extern const char kEnableExperimentalCookieFeaturesDescription[];
-
- diff --git a/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl b/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
- --- a/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
- +++ b/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
- @@ -123,10 +123,6 @@ public abstract class ChromeSwitches {{
- /** Switch for enabling the Chrome Survey. Only works when UMA is accepted. */
- public static final String CHROME_FORCE_ENABLE_SURVEY = "force-enable-chrome-survey";
-
- - /** Switch to enable incognito tabs to be seen in Android Recents. */
- - public static final String ENABLE_INCOGNITO_SNAPSHOTS_IN_ANDROID_RECENTS =
- - "enable-incognito-snapshots-in-android-recents";
- -
- /** Open all custom tabs in a new task. Used only for experimental purposes. */
- public static final String OPEN_CUSTOM_TABS_IN_NEW_TASK = "open-custom-tabs-in-new-task";
-
- diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
- --- a/chrome/common/chrome_switches.cc
- +++ b/chrome/common/chrome_switches.cc
- @@ -335,6 +335,9 @@ const char kHomePage[] = "homepage";
- // Causes the browser to launch directly in incognito mode.
- const char kIncognito[] = "incognito";
-
- +// Allows incognito tabs to be seen in Android Recents and thus user screenshots.
- +const char kEnableIncognitoSnapshotsInAndroidRecents[] = "enable-incognito-snapshots-in-android-recents";
- +
- // Installs an autogenerated theme based on the given RGB value.
- // The format is "r,g,b", where r, g, b are a numeric values from 0 to 255.
- const char kInstallAutogeneratedTheme[] = "install-autogenerated-theme";
- diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
- --- a/chrome/common/chrome_switches.h
- +++ b/chrome/common/chrome_switches.h
- @@ -110,6 +110,7 @@ extern const char kForceStackedTabStripLayout[];
- extern const char kHideCrashRestoreBubble[];
- extern const char kHomePage[];
- extern const char kIncognito[];
- +extern const char kEnableIncognitoSnapshotsInAndroidRecents[];
- extern const char kInstallAutogeneratedTheme[];
- extern const char kInstallChromeApp[];
- extern const char kInstantProcess[];
- --
- 2.20.1
|