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 27 matching lines...) Expand all Loading... |
38 Browser* FindAnyBrowser(Profile* profile, | 38 Browser* FindAnyBrowser(Profile* profile, |
39 bool match_original_profiles, | 39 bool match_original_profiles, |
40 HostDesktopType type); | 40 HostDesktopType type); |
41 | 41 |
42 // Find an existing browser window with the provided profile and hosted in the | 42 // Find an existing browser window with the provided profile and hosted in the |
43 // given desktop. Searches in the order of last activation. Only browsers that | 43 // given desktop. Searches in the order of last activation. Only browsers that |
44 // have been active can be returned. Returns NULL if no such browser currently | 44 // have been active can be returned. Returns NULL if no such browser currently |
45 // exists. | 45 // exists. |
46 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); | 46 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); |
47 | 47 |
| 48 // Retrieve all tabbed browser for a profile. |
| 49 // |type| refers to the host desktop the returned browser should belong to. |
| 50 std::vector<Browser*> FindAllTabbedBrowsersWithProfile(Profile* profile, |
| 51 HostDesktopType type); |
| 52 |
48 // Find an existing browser with the provided ID. Returns NULL if no such | 53 // Find an existing browser with the provided ID. Returns NULL if no such |
49 // browser currently exists. | 54 // browser currently exists. |
50 Browser* FindBrowserWithID(SessionID::id_type desired_id); | 55 Browser* FindBrowserWithID(SessionID::id_type desired_id); |
51 | 56 |
52 // Find the browser represented by |window| or NULL if not found. | 57 // Find the browser represented by |window| or NULL if not found. |
53 Browser* FindBrowserWithWindow(gfx::NativeWindow window); | 58 Browser* FindBrowserWithWindow(gfx::NativeWindow window); |
54 | 59 |
55 // Find the browser containing |web_contents| or NULL if none is found. | 60 // Find the browser containing |web_contents| or NULL if none is found. |
56 // |web_contents| must not be NULL. | 61 // |web_contents| must not be NULL. |
57 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); | 62 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); |
(...skipping 30 matching lines...) Expand all Loading... |
88 // defined by |type|. | 93 // defined by |type|. |
89 size_t GetBrowserCount(Profile* profile, HostDesktopType type); | 94 size_t GetBrowserCount(Profile* profile, HostDesktopType type); |
90 | 95 |
91 // Returns the number of tabbed browsers with the Profile |profile| on the | 96 // Returns the number of tabbed browsers with the Profile |profile| on the |
92 // desktop defined by |type|. | 97 // desktop defined by |type|. |
93 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); | 98 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); |
94 | 99 |
95 } // namespace chrome | 100 } // namespace chrome |
96 | 101 |
97 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 102 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
OLD | NEW |