OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/app_window_registry_util.h" | 5 #include "chrome/browser/apps/app_window_registry_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 AppWindowRegistry* registry = | 79 AppWindowRegistry* registry = |
80 Factory::GetForBrowserContext(*i, false /* create */); | 80 Factory::GetForBrowserContext(*i, false /* create */); |
81 if (!registry) | 81 if (!registry) |
82 continue; | 82 continue; |
83 | 83 |
84 // Ask each app window to close, but cater for windows removing or | 84 // Ask each app window to close, but cater for windows removing or |
85 // rearranging themselves in the ordered window list in response. | 85 // rearranging themselves in the ordered window list in response. |
86 AppWindowList window_list_copy(registry->app_windows()); | 86 AppWindowList window_list_copy(registry->app_windows()); |
87 for (auto* window : window_list_copy) { | 87 for (auto* window : window_list_copy) { |
88 // Ensure window is still valid. | 88 // Ensure window is still valid. |
89 if (ContainsValue(registry->app_windows(), window)) | 89 if (base::ContainsValue(registry->app_windows(), window)) |
90 window->GetBaseWindow()->Close(); | 90 window->GetBaseWindow()->Close(); |
91 } | 91 } |
92 } | 92 } |
93 } | 93 } |
OLD | NEW |