Home | History | Annotate | Download | only in ui

Lines Matching refs:Browser

12 #include "chrome/browser/ui/browser.h"
14 // Stores a list of all Browser objects.
17 typedef std::vector<Browser*> BrowserVector;
23 // browser windows while handling observer callbacks.
26 // Called immediately after a browser is added to the list
27 virtual void OnBrowserAdded(const Browser* browser) = 0;
29 // Called immediately after a browser is removed from the list
30 virtual void OnBrowserRemoved(const Browser* browser) = 0;
32 // Called immediately after a browser is set active (SetLastActive)
33 virtual void OnBrowserSetLastActive(const Browser* browser) {}
39 // Adds and removes browsers from the global list. The browser object should
42 static void AddBrowser(Browser* browser);
43 static void RemoveBrowser(Browser* browser);
48 // Called by Browser objects when their window is activated (focused). This
49 // allows us to determine what the last active Browser was.
50 static void SetLastActive(Browser* browser);
52 // Returns the Browser object whose window was most recently active. If the
53 // most recently open Browser's window was closed, returns the first Browser
56 // WARNING: this is NULL until a browser becomes active. If during startup
57 // a browser does not become active (perhaps the user launches Chrome, then
58 // clicks on another app before the first browser window appears) then this
61 static Browser* GetLastActive();
64 // open browser owned by |profile| is returned. If none exist, returns NULL.
66 static Browser* GetLastActiveWithProfile(Profile *profile);
68 // Find an existing browser window with the provided type. Searches in the
70 // returned. If |match_incognito| is true, will match a browser with either
72 // no such browser currently exists.
73 static Browser* FindBrowserWithType(Profile* p, Browser::Type t,
76 // Find an existing browser window that can provide the specified type (this
77 // uses Browser::CanSupportsWindowFeature, not
78 // Browser::SupportsWindowFeature). This searches in the order of last
80 // NULL if no such browser currently exists.
81 static Browser* FindBrowserWithFeature(Profile* p,
82 Browser::WindowFeature feature);
84 // Find an existing browser window with the provided profile. Searches in the
86 // returned. Returns NULL if no such browser currently exists.
87 static Browser* FindBrowserWithProfile(Profile* p);
89 // Find an existing browser with the provided ID. Returns NULL if no such
90 // browser currently exists.
91 static Browser* FindBrowserWithID(SessionID::id_type desired_id);
93 // Checks if the browser can be automatically restarted to install upgrades
94 // The browser can be automatically restarted when:
99 // Called from Browser::Exit.
116 // Returns true if there is at least one Browser with the specified profile.
119 // Tells the BrowserList to keep the application alive after the last Browser
125 // Stops keeping the application alive after the last Browser is closed.
129 // Returns true if application will continue running after the last Browser
144 // latest accessed browser first.
159 static size_t GetBrowserCountForType(Profile* p, Browser::Type type);
172 // Helper method to remove a browser instance from a list of browsers
173 static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list);
188 // continue running after the last browser has exited.
194 // Iterates through all web view hosts in all browser windows. Because the
197 // browser windows or tabs while iterating may cause incorrect behavior.
210 // Returns true if we are past the last Browser.
215 // Returns the Browser instance associated with the current TabContents.
217 Browser* browser() const {
242 // call when browser_iterator_ points to the first browser and
246 // iterator over all the Browser objects
249 // tab index into the current Browser of the current web view
253 // be extracted given the browser iterator and index, but it's nice to cache