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

Side by Side Diff: chrome/browser/browser_list.h

Issue 92043: Refactor ExtensionView to support a UI-less extension instance.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser.vcproj ('k') | chrome/browser/browser_list.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_BROWSER_LIST_H__ 5 #ifndef CHROME_BROWSER_BROWSER_LIST_H__
6 #define CHROME_BROWSER_BROWSER_LIST_H__ 6 #define CHROME_BROWSER_BROWSER_LIST_H__
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Identical in behavior to GetLastActive(), except that the most recently 53 // Identical in behavior to GetLastActive(), except that the most recently
54 // open browser owned by |profile| is returned. If none exist, returns NULL. 54 // open browser owned by |profile| is returned. If none exist, returns NULL.
55 static Browser* GetLastActiveWithProfile(Profile *profile); 55 static Browser* GetLastActiveWithProfile(Profile *profile);
56 56
57 // Find an existing browser window with the provided type. If the last active 57 // Find an existing browser window with the provided type. If the last active
58 // has the right type, it is returned. Otherwise, the next available browser 58 // has the right type, it is returned. Otherwise, the next available browser
59 // is returned. Returns NULL if no such browser currently exists. 59 // is returned. Returns NULL if no such browser currently exists.
60 static Browser* FindBrowserWithType(Profile* p, Browser::Type t); 60 static Browser* FindBrowserWithType(Profile* p, Browser::Type t);
61 61
62 // Find an existing browser window with the provided profile. If the last
63 // active has the right profile, it is returned. Returns NULL if no such
64 // browser currently exists.
65 static Browser* FindBrowserWithProfile(Profile* p);
66
62 // Find an existing browser with the provided ID. Returns NULL if no such 67 // Find an existing browser with the provided ID. Returns NULL if no such
63 // browser currently exists. 68 // browser currently exists.
64 static Browser* FindBrowserWithID(SessionID::id_type desired_id); 69 static Browser* FindBrowserWithID(SessionID::id_type desired_id);
65 70
66 // Closes all browsers. If use_post is true the windows are closed by way of 71 // Closes all browsers. If use_post is true the windows are closed by way of
67 // posting a WM_CLOSE message, otherwise the windows are closed directly. In 72 // posting a WM_CLOSE message, otherwise the windows are closed directly. In
68 // almost all cases you'll want to use true, the one exception is ending 73 // almost all cases you'll want to use true, the one exception is ending
69 // the session. use_post should only be false when invoked from end session. 74 // the session. use_post should only be false when invoked from end session.
70 static void CloseAllBrowsers(bool use_post); 75 static void CloseAllBrowsers(bool use_post);
71 76
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // tab index into the current Browser of the current web view 178 // tab index into the current Browser of the current web view
174 int web_view_index_; 179 int web_view_index_;
175 180
176 // Current WebContents, or NULL if we're at the end of the list. This can 181 // Current WebContents, or NULL if we're at the end of the list. This can
177 // be extracted given the browser iterator and index, but it's nice to cache 182 // be extracted given the browser iterator and index, but it's nice to cache
178 // this since the caller may access the current host many times. 183 // this since the caller may access the current host many times.
179 WebContents* cur_; 184 WebContents* cur_;
180 }; 185 };
181 186
182 #endif // CHROME_BROWSER_BROWSER_LIST_H__ 187 #endif // CHROME_BROWSER_BROWSER_LIST_H__
OLDNEW
« no previous file with comments | « chrome/browser/browser.vcproj ('k') | chrome/browser/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698