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 13 matching lines...) Expand all Loading... |
24 // if there are no tabbed browsers, use ScopedTabbedBrowserDisplayer. | 24 // if there are no tabbed browsers, use ScopedTabbedBrowserDisplayer. |
25 | 25 |
26 // Retrieve the last active tabbed browser with a profile matching |profile|. | 26 // Retrieve the last active tabbed browser with a profile matching |profile|. |
27 // If |match_original_profiles| is true, matching is done based on the | 27 // If |match_original_profiles| is true, matching is done based on the |
28 // original profile, eg profile->GetOriginalProfile() == | 28 // original profile, eg profile->GetOriginalProfile() == |
29 // browser->profile()->GetOriginalProfile(). This has the effect of matching | 29 // browser->profile()->GetOriginalProfile(). This has the effect of matching |
30 // against both non-incognito and incognito profiles. If | 30 // against both non-incognito and incognito profiles. If |
31 // |match_original_profiles| is false, only an exact match may be returned. | 31 // |match_original_profiles| is false, only an exact match may be returned. |
32 Browser* FindTabbedBrowser(Profile* profile, bool match_original_profiles); | 32 Browser* FindTabbedBrowser(Profile* profile, bool match_original_profiles); |
33 | 33 |
| 34 // Similar to FindTabbedBrowser(), but only retrieves the browser in the |
| 35 // display identified by |display_id|. |
| 36 Browser* FindTabbedBrowserOnDisplay(Profile* profile, |
| 37 bool match_original_profiles, |
| 38 int64_t display_id); |
| 39 |
34 // Finds an existing browser window of any kind. | 40 // Finds an existing browser window of any kind. |
35 Browser* FindAnyBrowser(Profile* profile, | 41 Browser* FindAnyBrowser(Profile* profile, |
36 bool match_original_profiles); | 42 bool match_original_profiles); |
37 | 43 |
38 // Find an existing browser window with the provided profile. Searches in the | 44 // Find an existing browser window with the provided profile. Searches in the |
39 // order of last activation. Only browsers that have been active can be | 45 // order of last activation. Only browsers that have been active can be |
40 // returned. Returns NULL if no such browser currently exists. | 46 // returned. Returns NULL if no such browser currently exists. |
41 Browser* FindBrowserWithProfile(Profile* profile); | 47 Browser* FindBrowserWithProfile(Profile* profile); |
42 | 48 |
43 // Find an existing browser with the provided ID. Returns NULL if no such | 49 // Find an existing browser with the provided ID. Returns NULL if no such |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 82 |
77 // Returns the number of browsers with the Profile |profile|. | 83 // Returns the number of browsers with the Profile |profile|. |
78 size_t GetBrowserCount(Profile* profile); | 84 size_t GetBrowserCount(Profile* profile); |
79 | 85 |
80 // Returns the number of tabbed browsers with the Profile |profile|. | 86 // Returns the number of tabbed browsers with the Profile |profile|. |
81 size_t GetTabbedBrowserCount(Profile* profile); | 87 size_t GetTabbedBrowserCount(Profile* profile); |
82 | 88 |
83 } // namespace chrome | 89 } // namespace chrome |
84 | 90 |
85 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 91 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
OLD | NEW |