Skip to content

Commit

Permalink
dpwa: Add kDesktopPWAsNotificationIconAndTitle feature flag.
Browse files Browse the repository at this point in the history
Our new feature will be implemented behind the feature flag.

Replaces the origin and the icon with an app name and an app icon in
notifications.

The flag will be visible on all desktop OSes:
kOsDesktop in about_flags.cc.

The launch will be gated by preprocessor macro:
OS_CHROMEOS OS_WIN etc in chrome_features.cc

Bug: 1190648
Change-Id: I2380cd60aa354b0aff626547de485df0b5d8802c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2871485
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879185}
  • Loading branch information
Alexey Baskakov authored and Chromium LUCI CQ committed May 5, 2021
1 parent 3b371c6 commit 5e71023
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3469,6 +3469,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kDesktopPWAsFlashAppNameInsteadOfOriginDescription,
kOsDesktop,
FEATURE_VALUE_TYPE(features::kDesktopPWAsFlashAppNameInsteadOfOrigin)},
{"enable-desktop-pwas-notification-icon-and-title",
flag_descriptions::kDesktopPWAsNotificationIconAndTitleName,
flag_descriptions::kDesktopPWAsNotificationIconAndTitleDescription,
kOsDesktop,
FEATURE_VALUE_TYPE(features::kDesktopPWAsNotificationIconAndTitle)},
{"enable-desktop-pwas-tab-strip",
flag_descriptions::kDesktopPWAsTabStripName,
flag_descriptions::kDesktopPWAsTabStripDescription, kOsDesktop,
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,11 @@
"owners": [ "alancutter@chromium.org", "desktop-pwas-team@google.com" ],
"expiry_milestone": 96
},
{
"name": "enable-desktop-pwas-notification-icon-and-title",
"owners": [ "loyso@chromium.org", "desktop-pwas-team@google.com" ],
"expiry_milestone": 98
},
{
"name": "enable-desktop-pwas-protocol-handling",
"owners": [ "samtan@microsoft.com", "desktop-pwas-team@google.com" ],
Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@ const char kDesktopPWAsFlashAppNameInsteadOfOriginDescription[] =
"Replaces the origin flash with an app name flash when launching a web app "
"window.";

const char kDesktopPWAsNotificationIconAndTitleName[] =
"Desktop PWAs improvements in notification icon and title";
const char kDesktopPWAsNotificationIconAndTitleDescription[] =
"Replaces the websites origin and the Chrome icon with the web app's name "
"and app icon in notifications.";

const char kDesktopPWAsLinkCapturingName[] =
"Desktop PWA declarative link capturing";
const char kDesktopPWAsLinkCapturingDescription[] =
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ extern const char kDesktopPWAsElidedExtensionsMenuDescription[];
extern const char kDesktopPWAsFlashAppNameInsteadOfOriginName[];
extern const char kDesktopPWAsFlashAppNameInsteadOfOriginDescription[];

extern const char kDesktopPWAsNotificationIconAndTitleName[];
extern const char kDesktopPWAsNotificationIconAndTitleDescription[];

extern const char kDesktopPWAsLinkCapturingName[];
extern const char kDesktopPWAsLinkCapturingDescription[];

Expand Down
5 changes: 5 additions & 0 deletions chrome/common/chrome_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ const base::Feature kDesktopPWAsFlashAppNameInsteadOfOrigin{
"DesktopPWAsFlashAppNameInsteadOfOrigin",
base::FEATURE_DISABLED_BY_DEFAULT};

// Replaces the origin text flash and the icon in web app notifications with
// the name of the app and the icon of the app.
const base::Feature kDesktopPWAsNotificationIconAndTitle{
"DesktopPWAsNotificationIconAndTitle", base::FEATURE_DISABLED_BY_DEFAULT};

// Enables or disables Desktop PWAs to be auto-started on OS login.
const base::Feature kDesktopPWAsRunOnOsLogin {
"DesktopPWAsRunOnOsLogin",
Expand Down
3 changes: 3 additions & 0 deletions chrome/common/chrome_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ extern const base::Feature kDesktopPWAsElidedExtensionsMenu;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kDesktopPWAsFlashAppNameInsteadOfOrigin;

COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kDesktopPWAsNotificationIconAndTitle;

COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kDesktopPWAsRunOnOsLogin;

Expand Down
2 changes: 2 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45747,6 +45747,7 @@ from previous Chrome versions.
<int value="-907234795" label="NewAudioRenderingMixingStrategy:disabled"/>
<int value="-905538983" label="SimplifyHttpsIndicator:disabled"/>
<int value="-902125579" label="ImmersiveUiMode:disabled"/>
<int value="-900871741" label="DesktopPWAsNotificationIconAndTitle:disabled"/>
<int value="-899915066" label="ImprovedKeyboardShortcuts:disabled"/>
<int value="-899393472" label="enable-new-app-menu-icon"/>
<int value="-899334103" label="disable-fast-text-autosizing"/>
Expand Down Expand Up @@ -46912,6 +46913,7 @@ from previous Chrome versions.
label="HappinessTrackingSurveysForDesktopDevToolsIssuesCookiesSameSite:enabled"/>
<int value="139569991" label="SharingDeviceExpiration:disabled"/>
<int value="143725809" label="DownloadProgressInfoBar:enabled"/>
<int value="144868136" label="DesktopPWAsNotificationIconAndTitle:enabled"/>
<int value="146229312" label="WebPaymentsExperimentalFeatures:enabled"/>
<int value="146553675" label="BookmarkBottomSheet:disabled"/>
<int value="147342055" label="ChromeHomeClearUrlOnOpen:disabled"/>
Expand Down

0 comments on commit 5e71023

Please sign in to comment.