Chromium Code Reviews| Index: chrome/browser/apps/app_window_registry_util.cc |
| diff --git a/chrome/browser/apps/app_window_registry_util.cc b/chrome/browser/apps/app_window_registry_util.cc |
| index d6917ce868b4d658241df90a2d1484c45263297d..011d64f4aed7f07da5a2357a57636ca8bbdf3a5a 100644 |
| --- a/chrome/browser/apps/app_window_registry_util.cc |
| +++ b/chrome/browser/apps/app_window_registry_util.cc |
| @@ -41,7 +41,7 @@ AppWindow* AppWindowRegistryUtil::GetAppWindowForNativeWindowAnyProfile( |
| } |
| // static |
| -bool AppWindowRegistryUtil::IsAppWindowRegisteredInAnyProfile( |
| +bool AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile( |
| int window_type_mask) { |
| std::vector<Profile*> profiles = |
| g_browser_process->profile_manager()->GetLoadedProfiles(); |
| @@ -57,13 +57,12 @@ bool AppWindowRegistryUtil::IsAppWindowRegisteredInAnyProfile( |
| if (app_windows.empty()) |
| continue; |
| - if (window_type_mask == 0) |
| - return true; |
| - |
| - for (AppWindowList::const_iterator j = app_windows.begin(); |
| - j != app_windows.end(); ++j) { |
| - if ((*j)->window_type() & window_type_mask) |
| + for (const AppWindow* window : app_windows) { |
| + if (!window->is_hidden() && |
| + (window_type_mask == 0 || |
| + (window->window_type() & window_type_mask))) { |
|
tapted
2015/01/06 02:50:47
optional-nit: up to you if you want the curly brac
jackhou1
2015/01/06 06:05:58
Done.
|
| return true; |
| + } |
| } |
| } |