| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Returns the Browser object owned by |profile| on the given desktop type | 61 // Returns the Browser object owned by |profile| on the given desktop type |
| 62 // whose window was most recently active. If no such Browsers exist, returns | 62 // whose window was most recently active. If no such Browsers exist, returns |
| 63 // NULL. | 63 // NULL. |
| 64 // | 64 // |
| 65 // WARNING: this is NULL until a browser becomes active. If during startup | 65 // WARNING: this is NULL until a browser becomes active. If during startup |
| 66 // a browser does not become active (perhaps the user launches Chrome, then | 66 // a browser does not become active (perhaps the user launches Chrome, then |
| 67 // clicks on another app before the first browser window appears) then this | 67 // clicks on another app before the first browser window appears) then this |
| 68 // returns NULL. | 68 // returns NULL. |
| 69 // WARNING #2: this will always be NULL in unit tests run on the bots. | 69 // WARNING #2: this will always be NULL in unit tests run on the bots. |
| 70 Browser* FindLastActiveWithProfile(Profile* profile, HostDesktopType type); | 70 Browser* FindLastActiveWithProfile(Profile* profile); |
| 71 | 71 |
| 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* FindLastActive(); |
| 81 | 81 |
| 82 // Returns the number of browsers across all profiles and desktops. | 82 // Returns the number of browsers across all profiles and desktops. |
| 83 size_t GetTotalBrowserCount(); | 83 size_t GetTotalBrowserCount(); |
| 84 | 84 |
| 85 // Returns the number of browsers with the Profile |profile| accross all | 85 // Returns the number of browsers with the Profile |profile| accross all |
| 86 // desktops. | 86 // desktops. |
| 87 size_t GetTotalBrowserCountForProfile(Profile* profile); | 87 size_t GetTotalBrowserCountForProfile(Profile* profile); |
| 88 | 88 |
| 89 // Returns the number of browsers with the Profile |profile| on the desktop | 89 // Returns the number of browsers with the Profile |profile| on the desktop |
| 90 // defined by |type|. | 90 // defined by |type|. |
| 91 size_t GetBrowserCount(Profile* profile, HostDesktopType type); | 91 size_t GetBrowserCount(Profile* profile, HostDesktopType type); |
| 92 | 92 |
| 93 // Returns the number of tabbed browsers with the Profile |profile| on the | 93 // Returns the number of tabbed browsers with the Profile |profile| on the |
| 94 // desktop defined by |type|. | 94 // desktop defined by |type|. |
| 95 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); | 95 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); |
| 96 | 96 |
| 97 } // namespace chrome | 97 } // namespace chrome |
| 98 | 98 |
| 99 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 99 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
| OLD | NEW |