| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/host_desktop.h" | 9 #include "chrome/browser/ui/host_desktop.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Returns the Browser object on the given desktop type whose window was most | 72 // Returns the Browser object on the given desktop type whose window was most |
| 73 // recently active. If no such Browsers exist, returns NULL. | 73 // recently active. If no such Browsers exist, returns NULL. |
| 74 // | 74 // |
| 75 // WARNING: this is NULL until a browser becomes active. If during startup | 75 // WARNING: this is NULL until a browser becomes active. If during startup |
| 76 // a browser does not become active (perhaps the user launches Chrome, then | 76 // a browser does not become active (perhaps the user launches Chrome, then |
| 77 // clicks on another app before the first browser window appears) then this | 77 // clicks on another app before the first browser window appears) then this |
| 78 // returns NULL. | 78 // returns NULL. |
| 79 // WARNING #2: this will always be NULL in unit tests run on the bots. | 79 // WARNING #2: this will always be NULL in unit tests run on the bots. |
| 80 Browser* FindLastActiveWithHostDesktopType(HostDesktopType type); | 80 Browser* FindLastActiveWithHostDesktopType(HostDesktopType type); |
| 81 | 81 |
| 82 // Returns the number of browsers across all profiles and desktops. |
| 83 size_t GetTotalBrowserCount(); |
| 84 |
| 82 // Returns the number of browsers with the Profile |profile|. | 85 // Returns the number of browsers with the Profile |profile|. |
| 83 size_t GetBrowserCount(Profile* profile); | 86 size_t GetBrowserCount(Profile* profile); |
| 84 | 87 |
| 85 // Returns the number of tabbed browsers with the Profile |profile|. | 88 // Returns the number of tabbed browsers with the Profile |profile|. |
| 86 size_t GetTabbedBrowserCount(Profile* profile); | 89 size_t GetTabbedBrowserCount(Profile* profile); |
| 87 | 90 |
| 88 } // namespace chrome | 91 } // namespace chrome |
| 89 | 92 |
| 90 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 93 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
| OLD | NEW |