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

Unified Diff: chrome/browser/ui/browser_list.h

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_list.h
diff --git a/chrome/browser/ui/browser_list.h b/chrome/browser/ui/browser_list.h
index 2cbc704fc13b3ecc5c505b1bb35b6c8b598850ed..5eca0c6c7b9e21b91964c697badeef2ae1059d1e 100644
--- a/chrome/browser/ui/browser_list.h
+++ b/chrome/browser/ui/browser_list.h
@@ -10,9 +10,11 @@
#include <vector>
#include "base/observer_list.h"
-#include "chrome/browser/ui/browser.h"
#include "ui/gfx/native_widget_types.h"
+class Browser;
+class Profile;
+
// Stores a list of all Browser objects.
class BrowserList {
public:
@@ -62,50 +64,6 @@ class BrowserList {
// WARNING #2: this will always be NULL in unit tests run on the bots.
static Browser* GetLastActive();
- // Identical in behavior to GetLastActive(), except that the most recently
- // open browser owned by |profile| is returned. If none exist, returns NULL.
- // WARNING: see warnings in GetLastActive().
- static Browser* GetLastActiveWithProfile(Profile* profile);
-
- // Retrieve the last active tabbed browser with a profile matching |profile|.
- // If |match_original_profiles| is true, matching is done based on the
- // original profile, eg profile->GetOriginalProfile() ==
- // browser->profile()->GetOriginalProfile(). This has the effect of matching
- // against both non-incognito and incognito profiles. If
- // |match_original_profiles| is false, only an exact match may be returned.
- static Browser* FindTabbedBrowser(Profile* profile,
- bool match_original_profiles);
-
- // Find an existing browser window with any type. See comment above for
- // additional information.
- static Browser* FindAnyBrowser(Profile* profile,
- bool match_original_profiles);
-
- // Find an existing browser window that can provide the specified type (this
- // uses Browser::CanSupportsWindowFeature, not
- // Browser::SupportsWindowFeature). This searches in the order of last
- // activation. Only browsers that have been active can be returned. Returns
- // NULL if no such browser currently exists.
- static Browser* FindBrowserWithFeature(Profile* profile,
- Browser::WindowFeature feature);
-
- // Find an existing browser window with the provided profile. Searches in the
- // order of last activation. Only browsers that have been active can be
- // returned. Returns NULL if no such browser currently exists.
- static Browser* FindBrowserWithProfile(Profile* profile);
-
- // Find an existing browser with the provided ID. Returns NULL if no such
- // browser currently exists.
- static Browser* FindBrowserWithID(SessionID::id_type desired_id);
-
- // Find the browser represented by |window| or NULL if not found.
- static Browser* FindBrowserWithWindow(gfx::NativeWindow window);
-
- // Find the browser containing |web_contents| or NULL if none is found.
- // |web_contents| must not be NULL.
- static Browser* FindBrowserWithWebContents(
- content::WebContents* web_contents);
-
// Checks if the browser can be automatically restarted to install upgrades
// The browser can be automatically restarted when:
// 1. It's in the background mode (no visible windows).
@@ -155,9 +113,6 @@ class BrowserList {
// Begins shutdown of the application when the desktop session is ending.
static void SessionEnding();
- // Returns true if there is at least one Browser with the specified profile.
- static bool HasBrowserWithProfile(Profile* profile);
-
// Tells the BrowserList to keep the application alive after the last Browser
// closes. This is implemented as a count, so callers should pair their calls
// to StartKeepAlive() with matching calls to EndKeepAlive() when they no
@@ -187,14 +142,6 @@ class BrowserList {
static const_reverse_iterator begin_last_active();
static const_reverse_iterator end_last_active();
- // Return the number of browsers with the following profile which are
- // currently open.
- static size_t GetBrowserCount(Profile* profile);
-
- // Return the number of browsers with the following profile and type which are
- // currently open.
- static size_t GetBrowserCountForType(Profile* profile, bool match_tabbed);
-
// Returns true if at least one incognito session is active.
static bool IsOffTheRecordSessionActive();

Powered by Google App Engine
This is Rietveld 408576698