| Index: chrome/browser/ui/panels/docked_panel_collection.cc
|
| diff --git a/chrome/browser/ui/panels/docked_panel_collection.cc b/chrome/browser/ui/panels/docked_panel_collection.cc
|
| index da5c4cc121eb1020c721f1105d3d84f8b0b2b1a3..1c6ed18f93dfc1365135c62a319d1834db72e7ad 100644
|
| --- a/chrome/browser/ui/panels/docked_panel_collection.cc
|
| +++ b/chrome/browser/ui/panels/docked_panel_collection.cc
|
| @@ -113,12 +113,8 @@ void DockedPanelCollection::AddPanel(Panel* panel,
|
| panels_.insert(iter, panel);
|
| }
|
|
|
| - if (update_bounds) {
|
| - if ((positioning_mask & DELAY_LAYOUT_REFRESH) != 0)
|
| - ScheduleLayoutRefresh();
|
| - else
|
| - RefreshLayout();
|
| - }
|
| + if (update_bounds)
|
| + RefreshLayout();
|
| }
|
|
|
| gfx::Point DockedPanelCollection::GetDefaultPositionForPanel(
|
| @@ -766,20 +762,8 @@ void DockedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) {
|
| panel->SetWindowCornerStyle(panel::TOP_ROUNDED);
|
| }
|
|
|
| -void DockedPanelCollection::ScheduleLayoutRefresh() {
|
| - refresh_action_factory_.InvalidateWeakPtrs();
|
| - MessageLoop::current()->PostDelayedTask(FROM_HERE,
|
| - base::Bind(&DockedPanelCollection::RefreshLayout,
|
| - refresh_action_factory_.GetWeakPtr()),
|
| - base::TimeDelta::FromMilliseconds(PanelManager::AdjustTimeInterval(
|
| - kRefreshLayoutAfterActivePanelChangeDelayMs)));
|
| -}
|
| -
|
| void DockedPanelCollection::OnPanelActiveStateChanged(Panel* panel) {
|
| - // Refresh layout, but wait till active states settle.
|
| - // This lets us avoid refreshing too many times when one panel loses
|
| - // focus and another gains it.
|
| - ScheduleLayoutRefresh();
|
| + RefreshLayout();
|
| }
|
|
|
| bool DockedPanelCollection::HasPanel(Panel* panel) const {
|
|
|