Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2960)

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 215253003: Fix infinite recursion on hiding panel when created during fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panels/panel_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index 2592337c24c195e671a4b3822b140be5036bbef6..95db2579663de31a3b66a63e6778f8b6b7496015 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -371,7 +371,6 @@ void PanelLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
panel_info.slide_in = true;
}
panel_windows_.push_back(panel_info);
- child->AddObserver(this);
wm::GetWindowState(child)->AddObserver(this);
Relayout();
}
@@ -388,7 +387,6 @@ void PanelLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
delete found->callout_widget;
panel_windows_.erase(found);
}
- child->RemoveObserver(this);
wm::GetWindowState(child)->RemoveObserver(this);
if (dragged_panel_ == child)
@@ -402,6 +400,8 @@ void PanelLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
void PanelLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
bool visible) {
+ if (visible)
+ wm::GetWindowState(child)->Restore();
Relayout();
}
@@ -481,12 +481,6 @@ void PanelLayoutManager::OnPostWindowStateTypeChange(
RestorePanel(window_state->window());
}
-void PanelLayoutManager::OnWindowVisibilityChanged(
- aura::Window* window, bool visible) {
- if (visible)
- wm::GetWindowState(window)->Restore();
-}
-
////////////////////////////////////////////////////////////////////////////////
// PanelLayoutManager, aura::client::ActivationChangeObserver implementation:
« no previous file with comments | « ash/wm/panels/panel_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698