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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // exists. | 45 // exists. |
46 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); | 46 Browser* FindBrowserWithProfile(Profile* profile, HostDesktopType type); |
47 | 47 |
48 // Find an existing browser with the provided ID. Returns NULL if no such | 48 // Find an existing browser with the provided ID. Returns NULL if no such |
49 // browser currently exists. | 49 // browser currently exists. |
50 Browser* FindBrowserWithID(SessionID::id_type desired_id); | 50 Browser* FindBrowserWithID(SessionID::id_type desired_id); |
51 | 51 |
52 // Find the browser represented by |window| or NULL if not found. | 52 // Find the browser represented by |window| or NULL if not found. |
53 Browser* FindBrowserWithWindow(gfx::NativeWindow window); | 53 Browser* FindBrowserWithWindow(gfx::NativeWindow window); |
54 | 54 |
| 55 // Find the window for the given |browser| or NULL if the browser has no open |
| 56 // windows. |
| 57 gfx::NativeWindow FindWindowForBrowser(Browser* browser); |
| 58 |
55 // Find the browser containing |web_contents| or NULL if none is found. | 59 // Find the browser containing |web_contents| or NULL if none is found. |
56 // |web_contents| must not be NULL. | 60 // |web_contents| must not be NULL. |
57 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); | 61 Browser* FindBrowserWithWebContents(const content::WebContents* web_contents); |
58 | 62 |
59 // Returns the Browser object owned by |profile| on the given desktop type | 63 // Returns the Browser object owned by |profile| on the given desktop type |
60 // whose window was most recently active. If no such Browsers exist, returns | 64 // whose window was most recently active. If no such Browsers exist, returns |
61 // NULL. | 65 // NULL. |
62 // | 66 // |
63 // WARNING: this is NULL until a browser becomes active. If during startup | 67 // WARNING: this is NULL until a browser becomes active. If during startup |
64 // a browser does not become active (perhaps the user launches Chrome, then | 68 // a browser does not become active (perhaps the user launches Chrome, then |
(...skipping 23 matching lines...) Expand all Loading... |
88 // defined by |type|. | 92 // defined by |type|. |
89 size_t GetBrowserCount(Profile* profile, HostDesktopType type); | 93 size_t GetBrowserCount(Profile* profile, HostDesktopType type); |
90 | 94 |
91 // Returns the number of tabbed browsers with the Profile |profile| on the | 95 // Returns the number of tabbed browsers with the Profile |profile| on the |
92 // desktop defined by |type|. | 96 // desktop defined by |type|. |
93 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); | 97 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type); |
94 | 98 |
95 } // namespace chrome | 99 } // namespace chrome |
96 | 100 |
97 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ | 101 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ |
OLD | NEW |