Index: chrome/browser/ui/panels/panel_manager.cc |
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc |
index e37eb43181267a871c5def44dc8c1f1920f06a94..7dd71557b56c6b4af00ae2b303ac8928c780484c 100644 |
--- a/chrome/browser/ui/panels/panel_manager.cc |
+++ b/chrome/browser/ui/panels/panel_manager.cc |
@@ -420,6 +420,10 @@ bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { |
} |
void PanelManager::BringUpOrDownTitlebars(bool bring_up) { |
+ if (are_titlebars_up_ == bring_up) |
+ return; |
+ are_titlebars_up_ = bring_up; |
+ |
int task_delay_milliseconds = 0; |
// If the auto-hiding bottom bar exists, delay the action until the bottom |
@@ -557,9 +561,6 @@ BrowserWindow* PanelManager::GetNextBrowserWindowToActivate( |
void PanelManager::OnMouseMove(const gfx::Point& mouse_position) { |
bool bring_up_titlebars = ShouldBringUpTitlebars(mouse_position.x(), |
mouse_position.y()); |
- if (are_titlebars_up_ == bring_up_titlebars) |
- return; |
- are_titlebars_up_ = bring_up_titlebars; |
BringUpOrDownTitlebars(bring_up_titlebars); |
} |