Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: chrome/browser/ui/browser_finder.h

Issue 12212120: Replace most BrowserList::empty() and BrowserList::size() calls by multi-desktop aware calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r182110 Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_finder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
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* FindLastActiveWithHostDesktopType(HostDesktopType type);
81 81
82 // Returns the number of browsers across all profiles and desktops.
83 size_t GetTotalBrowserCount();
84
82 // Returns the number of browsers with the Profile |profile|. 85 // Returns the number of browsers with the Profile |profile|.
83 size_t GetBrowserCount(Profile* profile); 86 size_t GetBrowserCount(Profile* profile);
84 87
85 // Returns the number of tabbed browsers with the Profile |profile|. 88 // Returns the number of tabbed browsers with the Profile |profile|.
86 size_t GetTabbedBrowserCount(Profile* profile); 89 size_t GetTabbedBrowserCount(Profile* profile);
87 90
88 } // namespace chrome 91 } // namespace chrome
89 92
90 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_ 93 #endif // CHROME_BROWSER_UI_BROWSER_FINDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698