| Index: chrome/browser/ui/panels/panel_overflow_strip.cc
|
| diff --git a/chrome/browser/ui/panels/panel_overflow_strip.cc b/chrome/browser/ui/panels/panel_overflow_strip.cc
|
| index d56bcd4886096b9f8950f371f80b2c728a83ca30..9609896e6c4bbfa2ec3a78f50d8c02b5ffcae369 100644
|
| --- a/chrome/browser/ui/panels/panel_overflow_strip.cc
|
| +++ b/chrome/browser/ui/panels/panel_overflow_strip.cc
|
| @@ -81,7 +81,7 @@ void PanelOverflowStrip::UpdateCurrentWidth() {
|
| void PanelOverflowStrip::AddPanel(Panel* panel) {
|
| // TODO(jianli): consider using other container to improve the perf for
|
| // inserting to the front. http://crbug.com/106222
|
| - DCHECK_EQ(Panel::IN_OVERFLOW, panel->expansion_state());
|
| + DCHECK_EQ(Panel::IN_OVERFLOW, panel->strip_owner());
|
| // Newly created panels that were temporarily in the panel strip
|
| // are added to the back of the overflow, whereas panels that are
|
| // bumped from the panel strip by other panels go to the front
|
| @@ -146,9 +146,10 @@ void PanelOverflowStrip::RemoveAll() {
|
| (*iter)->Close();
|
| }
|
|
|
| -void PanelOverflowStrip::OnPanelExpansionStateChanged(Panel* panel) {
|
| - // Only care about new state being overflow.
|
| - if (panel->expansion_state() != Panel::IN_OVERFLOW)
|
| +void PanelOverflowStrip::OnPanelStripOwnerChanged(Panel* panel,
|
| + Panel::StripOwner old_owner) {
|
| + // Only care about new owner being overflow.
|
| + if (panel->strip_owner() != Panel::IN_OVERFLOW)
|
| return;
|
|
|
| panel_manager_->panel_strip()->Remove(panel);
|
| @@ -158,7 +159,7 @@ void PanelOverflowStrip::OnPanelExpansionStateChanged(Panel* panel) {
|
| }
|
|
|
| void PanelOverflowStrip::OnPanelAttentionStateChanged(Panel* panel) {
|
| - DCHECK(panel->expansion_state() == Panel::IN_OVERFLOW);
|
| + DCHECK_EQ(Panel::IN_OVERFLOW, panel->strip_owner());
|
| UpdateOverflowIndicatorAttention();
|
| }
|
|
|
|
|