Commit 382a4f17 authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

[Tab Groups Collapse] Activate tab group header collapse by keyboard.

Bug: 1018230
Change-Id: I89f5f54b6e1083c7375b1b15f444a86b2a1269a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225376
Commit-Queue: Charlene Yan <cyan@chromium.org>
Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773936}
parent 2303ca87
...@@ -106,8 +106,14 @@ bool TabGroupHeader::OnKeyPressed(const ui::KeyEvent& event) { ...@@ -106,8 +106,14 @@ bool TabGroupHeader::OnKeyPressed(const ui::KeyEvent& event) {
if ((event.key_code() == ui::VKEY_SPACE || if ((event.key_code() == ui::VKEY_SPACE ||
event.key_code() == ui::VKEY_RETURN) && event.key_code() == ui::VKEY_RETURN) &&
!editor_bubble_tracker_.is_open()) { !editor_bubble_tracker_.is_open()) {
editor_bubble_tracker_.Opened(TabGroupEditorBubbleView::Show( if (base::FeatureList::IsEnabled(features::kTabGroupsCollapse)) {
tab_strip_->controller()->GetBrowser(), group().value(), this)); // The collapse feature changes the behavior from showing the
// editor bubble to toggling the collapsed state of the group.
tab_strip_->controller()->ToggleTabGroupCollapsedState(group().value());
} else {
editor_bubble_tracker_.Opened(TabGroupEditorBubbleView::Show(
tab_strip_->controller()->GetBrowser(), group().value(), this));
}
return true; return true;
} }
......
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