| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 iter != user_id_hash_window_list_map_.end(); | 215 iter != user_id_hash_window_list_map_.end(); |
| 216 ++iter) { | 216 ++iter) { |
| 217 if (iter->second.find(window) != iter->second.end()) | 217 if (iter->second.find(window) != iter->second.end()) |
| 218 return; | 218 return; |
| 219 } | 219 } |
| 220 // Remove observer if |window| is not observed by any users. | 220 // Remove observer if |window| is not observed by any users. |
| 221 window->RemoveObserver(this); | 221 window->RemoveObserver(this); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void WindowStateManager::OnWindowDestroyed(aura::Window* window) { | 224 void WindowStateManager::OnWindowDestroyed(aura::Window* window) { |
| 225 window->RemoveObserver(this); | |
| 226 | |
| 227 for (UserIDHashWindowListMap::iterator iter = | 225 for (UserIDHashWindowListMap::iterator iter = |
| 228 user_id_hash_window_list_map_.begin(); | 226 user_id_hash_window_list_map_.begin(); |
| 229 iter != user_id_hash_window_list_map_.end(); | 227 iter != user_id_hash_window_list_map_.end(); |
| 230 ++iter) { | 228 ++iter) { |
| 231 iter->second.erase(window); | 229 iter->second.erase(window); |
| 232 } | 230 } |
| 233 } | 231 } |
| 234 | 232 |
| 235 } // namespace | 233 } // namespace |
| 236 | 234 |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 this, file_list)); | 840 this, file_list)); |
| 843 } | 841 } |
| 844 | 842 |
| 845 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 843 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
| 846 const std::vector<std::string>& file_list) { | 844 const std::vector<std::string>& file_list) { |
| 847 ListValue* results = new ListValue(); | 845 ListValue* results = new ListValue(); |
| 848 results->AppendStrings(file_list); | 846 results->AppendStrings(file_list); |
| 849 SetResult(results); | 847 SetResult(results); |
| 850 SendResponse(true); | 848 SendResponse(true); |
| 851 } | 849 } |
| OLD | NEW |