observer.SetTabNeedsAttentionAt(index, attention);SetTabNeedsAttentionAt can mean no longer needs attention, if changing the name maybe we can update to show that the attention is potentially not needed anymore.
observer.OnTabGroupNeedsAttention(group, attention);ditto above
int index) {}optional: move all the functions back to where they were before so we keep the blame history.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
observer.SetTabNeedsAttentionAt(index, attention);SetTabNeedsAttentionAt can mean no longer needs attention, if changing the name maybe we can update to show that the attention is potentially not needed anymore.
Done
observer.OnTabGroupNeedsAttention(group, attention);Eshwar Stalinditto above
Done
optional: move all the functions back to where they were before so we keep the blame history.
I think keeping related things together is better (even if we lose the blame history), so will keep it as is.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
9 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
Insertions: 3, Deletions: 3.
@@ -912,12 +912,12 @@
}
}
-void BrowserTabStripController::OnTabNeedsAttentionAt(int index,
- bool attention) {
+void BrowserTabStripController::OnTabNeedsAttentionChanged(int index,
+ bool attention) {
tabstrip_->SetTabNeedsAttention(index, attention);
}
-void BrowserTabStripController::OnTabGroupNeedsAttention(
+void BrowserTabStripController::OnTabGroupNeedsAttentionChanged(
const tab_groups::TabGroupId& group,
bool attention) {
tabstrip_->SetTabGroupNeedsAttention(group, attention);
```
```
The name of the file: chrome/browser/ui/tabs/tab_strip_model.cc
Insertions: 2, Deletions: 2.
@@ -1223,7 +1223,7 @@
CHECK(ContainsIndex(index));
for (auto& observer : observers_) {
- observer.OnTabNeedsAttentionAt(index, attention);
+ observer.OnTabNeedsAttentionChanged(index, attention);
}
}
@@ -1233,7 +1233,7 @@
CHECK(group_model_->ContainsTabGroup(group));
for (auto& observer : observers_) {
- observer.OnTabGroupNeedsAttention(group, attention);
+ observer.OnTabGroupNeedsAttentionChanged(group, attention);
}
}
```
```
The name of the file: chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
Insertions: 3, Deletions: 3.
@@ -156,9 +156,9 @@
std::optional<tab_groups::TabGroupId> new_group,
tabs::TabInterface* tab,
int index) override;
- void OnTabNeedsAttentionAt(int index, bool attention) override;
- void OnTabGroupNeedsAttention(const tab_groups::TabGroupId& group,
- bool attention) override;
+ void OnTabNeedsAttentionChanged(int index, bool attention) override;
+ void OnTabGroupNeedsAttentionChanged(const tab_groups::TabGroupId& group,
+ bool attention) override;
void OnSplitTabChanged(const SplitTabChange& change) override;
void OnTabGroupFocusChanged(
std::optional<tab_groups::TabGroupId> new_group_id,
```
```
The name of the file: chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos.cc
Insertions: 3, Deletions: 2.
@@ -510,8 +510,9 @@
UpdateBrowserControlsStateShown(new_active_contents, /*animate=*/true);
}
-void TopControlsSlideControllerChromeOS::OnTabNeedsAttentionAt(int index,
- bool attention) {
+void TopControlsSlideControllerChromeOS::OnTabNeedsAttentionChanged(
+ int index,
+ bool attention) {
UpdateBrowserControlsStateShown(/*web_contents=*/nullptr, /*animate=*/true);
}
```
```
The name of the file: chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos.h
Insertions: 1, Deletions: 1.
@@ -65,7 +65,7 @@
TabStripModel* tab_strip_model,
const TabStripModelChange& change,
const TabStripSelectionChange& selection) override;
- void OnTabNeedsAttentionAt(int index, bool attention) override;
+ void OnTabNeedsAttentionChanged(int index, bool attention) override;
// display::DisplayObserver:
void OnDisplayMetricsChanged(const display::Display& display,
```
```
The name of the file: chrome/browser/ui/tabs/tab_strip_model_observer.cc
Insertions: 3, Deletions: 2.
@@ -366,7 +366,8 @@
void TabStripModelObserver::OnTabBlockedStateChanged(tabs::TabInterface* tab,
int index) {}
-void TabStripModelObserver::OnTabNeedsAttentionAt(int index, bool attention) {}
+void TabStripModelObserver::OnTabNeedsAttentionChanged(int index,
+ bool attention) {}
void TabStripModelObserver::TabGroupedStateChanged(
TabStripModel* tab_strip_model,
@@ -381,7 +382,7 @@
std::optional<tab_groups::TabGroupId> new_focused_group_id,
std::optional<tab_groups::TabGroupId> old_focused_group_id) {}
-void TabStripModelObserver::OnTabGroupNeedsAttention(
+void TabStripModelObserver::OnTabGroupNeedsAttentionChanged(
const tab_groups::TabGroupId& group,
bool attention) {}
```
```
The name of the file: chrome/browser/ui/tabs/tab_strip_model_observer.h
Insertions: 6, Deletions: 5.
@@ -565,7 +565,7 @@
// The specified tab at `index` requires the display of a UI indication to the
// user that it needs their attention. The UI indication is set iff
// `attention` is true.
- virtual void OnTabNeedsAttentionAt(int index, bool attention);
+ virtual void OnTabNeedsAttentionChanged(int index, bool attention);
// Called when the tab at `index` is added to the group with id `new_group` or
// removed from a group with id `old_group`.
@@ -587,10 +587,11 @@
std::optional<tab_groups::TabGroupId> new_focused_group_id,
std::optional<tab_groups::TabGroupId> old_focused_group_id);
- // Similar to SetTabNeedsAttentionAt but for Tab Groups. The UI indication is
- // set iff `attention` is true.
- virtual void OnTabGroupNeedsAttention(const tab_groups::TabGroupId& group,
- bool attention);
+ // Similar to OnTabNeedsAttentionChanged but for Tab Groups. The UI indication
+ // is set iff `attention` is true.
+ virtual void OnTabGroupNeedsAttentionChanged(
+ const tab_groups::TabGroupId& group,
+ bool attention);
// Notfies us when a Tab Group is added to the Tab Group Model.
virtual void OnTabGroupAdded(const tab_groups::TabGroupId& group_id);
```
Updating TabStripModel observer methods for consistency
Renaming some of the functions for consistency. Also switching some of
the functions from using content::WebContents to tabs::TabInterface to better align with the long term direction.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |