Chromium Code Reviews| Index: ash/shelf/shelf_window_watcher.cc |
| diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc |
| index f177e48c2972680f972251eafcd23e8853c78830..b7b3cfeb2709bb2a2053fe36b03bcc4e316c8f55 100644 |
| --- a/ash/shelf/shelf_window_watcher.cc |
| +++ b/ash/shelf/shelf_window_watcher.cc |
| @@ -146,18 +146,18 @@ void ShelfWindowWatcher::OnWindowAdded(aura::Window* window) { |
| } |
| void ShelfWindowWatcher::OnWillRemoveWindow(aura::Window* window) { |
| - // Remove a child window of default container and its item if it has. |
| + // Remove a child window of default container. |
| if (observed_windows_.IsObserving(window)) |
|
sky
2013/12/12 16:41:43
If you do this, it means you need to better track
simonhong
2013/12/13 02:03:45
Checked window's dragging state and if so, an item
|
| observed_windows_.Remove(window); |
| - |
| - if (HasLauncherItemForWindow(window)) |
| - RemoveLauncherItem(window); |
| } |
| void ShelfWindowWatcher::OnWindowDestroying(aura::Window* window) { |
| // Remove the default container. |
| if (observed_windows_.IsObserving(window)) |
| observed_windows_.Remove(window); |
| + |
| + if (HasLauncherItemForWindow(window)) |
| + RemoveLauncherItem(window); |
| } |
| void ShelfWindowWatcher::OnWindowPropertyChanged(aura::Window* window, |