Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 Browser* FindAnyBrowser(Profile* profile, | 40 Browser* FindAnyBrowser(Profile* profile, |
| 41 bool match_original_profiles, | 41 bool match_original_profiles, |
| 42 HostDesktopType type); | 42 HostDesktopType type); |
| 43 | 43 |
| 44 // Find an existing browser window with the provided profile and hosted in the | 44 // Find an existing browser window with the provided profile and hosted in the |
| 45 // given desktop. Searches in the order of last activation. Only browsers that | 45 // given desktop. Searches in the order of last activation. Only browsers that |
| 46 // have been active can be returned. Returns NULL if no such browser currently | 46 // have been active can be returned. Returns NULL if no such browser currently |
| 47 // exists. | 47 // exists. |
| 48 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); | 48 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); |
| 49 | 49 |
| 50 // Retrieve all tabbed browser for a profile. | |
| 51 // |type| refers to the host desktop the returned browser should belong to. | |
| 52 std::vector<Browser*> FindAllTabbedBrowsersWithProfile(Profile* profile, | |
| 53 HostDesktopType type); | |
|
Avi (use Gerrit)
2016/01/08 17:11:39
I feel skeptical when a feature needs new function
GeorgeZ
2016/01/08 19:39:02
This is a very good point. I had no knowledge of B
| |
| 54 | |
| 50 // Find an existing browser with the provided ID. Returns NULL if no such | 55 // Find an existing browser with the provided ID. Returns NULL if no such |
| 51 // browser currently exists. | 56 // browser currently exists. |
| 52 Browser* FindBrowserWithID(SessionID::id_type desired_id); | 57 Browser* FindBrowserWithID(SessionID::id_type desired_id); |
| 53 | 58 |
| 54 // Find the browser represented by |window| or NULL if not found. | 59 // Find the browser represented by |window| or NULL if not found. |
| 55 Browser* FindBrowserWithWindow(gfx::NativeWindow window); | 60 Browser* FindBrowserWithWindow(gfx::NativeWindow window); |
| 56 | 61 |
| 57 // Find the browser containing |web_contents| or NULL if none is found. | 62 // Find the browser containing |web_contents| or NULL if none is found. |
| 58 // |web_contents| must not be NULL. | 63 // |web_contents| must not be NULL. |
| 59 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); | 64 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 90 // defined by |type|. | 95 // defined by |type|. |
| 91 size_t GetBrowserCount(Profile* profile, HostDesktopType type); | 96 size_t GetBrowserCount(Profile* profile, HostDesktopType type); |
| 92 | 97 |
| 93 // Returns the number of tabbed browsers with the Profile |profile| on the | 98 // Returns the number of tabbed browsers with the Profile |profile| on the |
| 94 // desktop defined by |type|. | 99 // desktop defined by |type|. |
| 95 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); | 100 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); |
| 96 | 101 |
| 97 } // namespace chrome | 102 } // namespace chrome |
| 98 | 103 |
| 99 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 104 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
| OLD | NEW |