Commit 02d811ec authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Delete unused BrowserNonClientFrameView and TabStripObserver methods.

BrowserNonClientFrameView::UpdateClientArea has no default behavior and
is never overriden. It is only ever called from
BrowserNonClientFrameViewAsh::OnTabsMaxXChanged, which is the only
override of TabStripObserver::OnTabsMaxXChanged. This patch deletes
those methods.

Change-Id: Ifa943298d6a925b2f4c0cb0120164324fbacd42b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1545493
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#646500}
parent e510b8c3
...@@ -207,8 +207,6 @@ int BrowserNonClientFrameView::GetTabBackgroundResourceId( ...@@ -207,8 +207,6 @@ int BrowserNonClientFrameView::GetTabBackgroundResourceId(
return id; return id;
} }
void BrowserNonClientFrameView::UpdateClientArea() {}
void BrowserNonClientFrameView::UpdateMinimumSize() {} void BrowserNonClientFrameView::UpdateMinimumSize() {}
void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from, void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from,
......
...@@ -121,9 +121,6 @@ class BrowserNonClientFrameView : public views::NonClientFrameView, ...@@ -121,9 +121,6 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// Updates the throbber. // Updates the throbber.
virtual void UpdateThrobber(bool running) = 0; virtual void UpdateThrobber(bool running) = 0;
// Provided for mus. Updates the client-area of the WindowTreeHostMus.
virtual void UpdateClientArea();
// Provided for mus and macOS to update the minimum window size property. // Provided for mus and macOS to update the minimum window size property.
virtual void UpdateMinimumSize(); virtual void UpdateMinimumSize();
......
...@@ -295,11 +295,6 @@ void BrowserNonClientFrameViewAsh::UpdateMinimumSize() { ...@@ -295,11 +295,6 @@ void BrowserNonClientFrameViewAsh::UpdateMinimumSize() {
} }
} }
void BrowserNonClientFrameViewAsh::OnTabsMaxXChanged() {
BrowserNonClientFrameView::OnTabsMaxXChanged();
UpdateClientArea();
}
bool BrowserNonClientFrameViewAsh::CanUserExitFullscreen() const { bool BrowserNonClientFrameViewAsh::CanUserExitFullscreen() const {
return !platform_util::IsBrowserLockedFullscreen(browser_view()->browser()); return !platform_util::IsBrowserLockedFullscreen(browser_view()->browser());
} }
......
...@@ -66,7 +66,6 @@ class BrowserNonClientFrameViewAsh ...@@ -66,7 +66,6 @@ class BrowserNonClientFrameViewAsh
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
void UpdateThrobber(bool running) override; void UpdateThrobber(bool running) override;
void UpdateMinimumSize() override; void UpdateMinimumSize() override;
void OnTabsMaxXChanged() override;
bool CanUserExitFullscreen() const override; bool CanUserExitFullscreen() const override;
SkColor GetCaptionColor(ActiveState active_state) const override; SkColor GetCaptionColor(ActiveState active_state) const override;
......
...@@ -271,7 +271,6 @@ void ImmersiveModeControllerAsh::SetVisibleFraction(double visible_fraction) { ...@@ -271,7 +271,6 @@ void ImmersiveModeControllerAsh::SetVisibleFraction(double visible_fraction) {
} }
visible_fraction_ = visible_fraction; visible_fraction_ = visible_fraction;
browser_view_->Layout(); browser_view_->Layout();
browser_view_->frame()->GetFrameView()->UpdateClientArea();
} }
std::vector<gfx::Rect> ImmersiveModeControllerAsh::GetVisibleBoundsInScreen() std::vector<gfx::Rect> ImmersiveModeControllerAsh::GetVisibleBoundsInScreen()
......
...@@ -349,11 +349,6 @@ void TabStrip::FrameColorsChanged() { ...@@ -349,11 +349,6 @@ void TabStrip::FrameColorsChanged() {
SchedulePaint(); SchedulePaint();
} }
int TabStrip::GetTabsMaxX() const {
// There might be no tabs yet during startup.
return tab_count() ? ideal_bounds(tab_count() - 1).right() : 0;
}
void TabStrip::SetBackgroundOffset(int offset) { void TabStrip::SetBackgroundOffset(int offset) {
for (int i = 0; i < tab_count(); ++i) for (int i = 0; i < tab_count(); ++i)
tab_at(i)->set_background_offset(offset); tab_at(i)->set_background_offset(offset);
...@@ -2505,8 +2500,6 @@ void TabStrip::GenerateIdealBounds() { ...@@ -2505,8 +2500,6 @@ void TabStrip::GenerateIdealBounds() {
if (tab_count() == 0) if (tab_count() == 0)
return; // Should only happen during creation/destruction, ignore. return; // Should only happen during creation/destruction, ignore.
const int old_max_x = GetTabsMaxX();
if (!touch_layout_) { if (!touch_layout_) {
const int available_width = (available_width_for_tabs_ < 0) const int available_width = (available_width_for_tabs_ < 0)
? GetTabAreaWidth() ? GetTabAreaWidth()
...@@ -2522,11 +2515,6 @@ void TabStrip::GenerateIdealBounds() { ...@@ -2522,11 +2515,6 @@ void TabStrip::GenerateIdealBounds() {
} }
new_tab_button_bounds_.set_origin(gfx::Point(NewTabButtonIdealX(), 0)); new_tab_button_bounds_.set_origin(gfx::Point(NewTabButtonIdealX(), 0));
if (GetTabsMaxX() != old_max_x) {
for (TabStripObserver& observer : observers_)
observer.OnTabsMaxXChanged();
}
} }
int TabStrip::GenerateIdealBoundsForPinnedTabs(int* first_non_pinned_index) { int TabStrip::GenerateIdealBoundsForPinnedTabs(int* first_non_pinned_index) {
......
...@@ -86,9 +86,6 @@ class TabStrip : public views::AccessiblePaneView, ...@@ -86,9 +86,6 @@ class TabStrip : public views::AccessiblePaneView,
// Called when the colors of the frame change. // Called when the colors of the frame change.
void FrameColorsChanged(); void FrameColorsChanged();
// Returns the trailing edge of the last tab.
int GetTabsMaxX() const;
// Set the background offset used by inactive tabs to match the frame image. // Set the background offset used by inactive tabs to match the frame image.
void SetBackgroundOffset(int offset); void SetBackgroundOffset(int offset);
......
...@@ -9,5 +9,3 @@ void TabStripObserver::OnTabAdded(int index) {} ...@@ -9,5 +9,3 @@ void TabStripObserver::OnTabAdded(int index) {}
void TabStripObserver::OnTabMoved(int from_index, int to_index) {} void TabStripObserver::OnTabMoved(int from_index, int to_index) {}
void TabStripObserver::OnTabRemoved(int index) {} void TabStripObserver::OnTabRemoved(int index) {}
void TabStripObserver::OnTabsMaxXChanged() {}
...@@ -31,9 +31,6 @@ class CHROME_VIEWS_EXPORT TabStripObserver { ...@@ -31,9 +31,6 @@ class CHROME_VIEWS_EXPORT TabStripObserver {
// Sent when the tab at |index| has been removed. // Sent when the tab at |index| has been removed.
virtual void OnTabRemoved(int index); virtual void OnTabRemoved(int index);
// Sent when the trailing edge of the last tab has changed.
virtual void OnTabsMaxXChanged();
protected: protected:
virtual ~TabStripObserver() {} virtual ~TabStripObserver() {}
}; };
......
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