Commit 180fa1df authored by Ana Salazar's avatar Ana Salazar Committed by Chromium LUCI CQ

Add 'New' badge to clipboard menu

We introduce a new option in the chrome context menu. To draw attention
to this feature, we will add a new nudge next to the option.

This addition will be controlled by a flag which will be initially
activated in 89 stable.

Bug: 1156270
Change-Id: I774fec96960eca04299f3afcde69df51b8569d8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613526Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Ana Salazar <anasalazar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840797}
parent 7148b10c
......@@ -1740,6 +1740,9 @@ void RenderViewContextMenu::AppendEditableItems() {
menu_model_.AddItemWithStringId(
IDC_CONTENT_CLIPBOARD_HISTORY_MENU,
IDS_CONTEXT_MENU_SHOW_CLIPBOARD_HISTORY_MENU);
menu_model_.SetIsNewFeatureAt(
menu_model_.GetIndexOfCommandId(IDC_CONTENT_CLIPBOARD_HISTORY_MENU),
chromeos::features::IsClipboardHistoryContextMenuNudgeEnabled());
}
#endif
......
......@@ -378,6 +378,11 @@ const base::Feature kClipboardHistoryNudgeSessionReset{
const base::Feature kClipboardHistorySimpleRender{
"ClipboardHistorySimpleRender", base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, a blue new nudge will show on the context menu option for
// clipboard history.
const base::Feature kClipboardHistoryContextMenuNudge{
"ClipboardHistoryContextMenuNudge", base::FEATURE_DISABLED_BY_DEFAULT};
// Enables copying an image to the system clipboard to support pasting onto
// different surfaces
const base::Feature kEnableFilesAppCopyImage{"EnableFilesAppCopyImage",
......@@ -810,6 +815,10 @@ bool IsClipboardHistorySimpleRenderEnabled() {
base::FeatureList::IsEnabled(kClipboardHistorySimpleRender);
}
bool IsClipboardHistoryContextMenuNudgeEnabled() {
return base::FeatureList::IsEnabled(kClipboardHistoryContextMenuNudge);
}
bool IsPhoneHubEnabled() {
return base::FeatureList::IsEnabled(kPhoneHub);
}
......
......@@ -168,6 +168,8 @@ extern const base::Feature kClipboardHistoryNudgeSessionReset;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kClipboardHistorySimpleRender;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kClipboardHistoryContextMenuNudge;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kEnableFilesAppCopyImage;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kFsNosymfollow;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
......@@ -351,6 +353,8 @@ COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
bool IsClipboardHistoryNudgeSessionResetEnabled();
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
bool IsClipboardHistorySimpleRenderEnabled();
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
bool IsClipboardHistoryContextMenuNudgeEnabled();
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) bool IsOobeChromeVoxHintEnabled();
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) bool IsOobeScreensPriorityEnabled();
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) bool IsPhoneHubEnabled();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment