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

Unified Diff: ash/shelf/shelf_window_watcher.cc

Issue 108313006: [ash] Don't remove an item when associated window is dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unittest for dragging a window Created 7 years 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 | « no previous file | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698