Fixing the behavior for the declutter nudge press callback
Also added a TODO for the focus issue with the tab strip nudge button which shows up in the focus traversal when not showing. This will be fixed in a separate follow-up CL. Change-Id: I1d306b66b9b00ff1d540eec9d28cae3be0f31cd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6385284 Commit-Queue: Eshwar Stalin <estalin@chromium.org> Reviewed-by: Jeffrey Cohen <jeffreycohen@google.com> Cr-Commit-Position: refs/heads/main@{#1438416}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
ee8af1f4e4
commit
afb1aa47b1
chrome/browser/ui/views/tabs
@ -13,6 +13,7 @@
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_element_identifiers.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
|
||||
#include "chrome/browser/ui/layout_constants.h"
|
||||
#include "chrome/browser/ui/tabs/organization/tab_declutter_controller.h"
|
||||
@ -384,6 +385,9 @@ void TabStripActionContainer::OnTabDeclutterButtonClicked() {
|
||||
base::UmaHistogramEnumeration(kDeclutterTriggerOutcomeName,
|
||||
TriggerOutcome::kAccepted);
|
||||
LogDeclutterTriggerBucket(true);
|
||||
browser_->window()->CreateTabSearchBubble(
|
||||
tab_search::mojom::TabSearchSection::kOrganize,
|
||||
tab_search::mojom::TabOrganizationFeature::kDeclutter);
|
||||
|
||||
ExecuteHideTabStripNudge(tab_declutter_button_);
|
||||
}
|
||||
|
@ -151,6 +151,9 @@ void TabStripNudgeButton::SetCloseButton(PressedCallback pressed_callback) {
|
||||
close_button_ = AddChildView(std::move(close_button));
|
||||
}
|
||||
|
||||
// TODO(crbug.com/405832481): Update focus behavior of nudge button itself
|
||||
// when it isn't showing. Also make this method virtual to allow GlicButton
|
||||
// class to override the implementation.
|
||||
void TabStripNudgeButton::SetIsShowingNudge(bool is_showing) {
|
||||
is_showing_nudge_ = is_showing;
|
||||
if (is_showing) {
|
||||
|
Reference in New Issue
Block a user