OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LIST_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // and we push_back on recent access so a reverse iterator gives the | 147 // and we push_back on recent access so a reverse iterator gives the |
148 // latest accessed browser first. | 148 // latest accessed browser first. |
149 static const_reverse_iterator begin_last_active() { | 149 static const_reverse_iterator begin_last_active() { |
150 return last_active_browsers_.rbegin(); | 150 return last_active_browsers_.rbegin(); |
151 } | 151 } |
152 | 152 |
153 static const_reverse_iterator end_last_active() { | 153 static const_reverse_iterator end_last_active() { |
154 return last_active_browsers_.rend(); | 154 return last_active_browsers_.rend(); |
155 } | 155 } |
156 | 156 |
| 157 // Returns vector of open browsers associated with |profile|. |
| 158 static std::vector<Browser*> GetBrowsersWithProfile(Profile* profile); |
| 159 |
157 // Return the number of browsers with the following profile which are | 160 // Return the number of browsers with the following profile which are |
158 // currently open. | 161 // currently open. |
159 static size_t GetBrowserCount(Profile* profile); | 162 static size_t GetBrowserCount(Profile* profile); |
160 | 163 |
161 // Return the number of browsers with the following profile and type which are | 164 // Return the number of browsers with the following profile and type which are |
162 // currently open. | 165 // currently open. |
163 static size_t GetBrowserCountForType(Profile* profile, bool match_tabbed); | 166 static size_t GetBrowserCountForType(Profile* profile, bool match_tabbed); |
164 | 167 |
165 // Returns true if at least one incognito session is active. | 168 // Returns true if at least one incognito session is active. |
166 static bool IsOffTheRecordSessionActive(); | 169 static bool IsOffTheRecordSessionActive(); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // iterator over the TabContentsWrappers doing background printing. | 261 // iterator over the TabContentsWrappers doing background printing. |
259 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; | 262 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; |
260 | 263 |
261 // Current TabContents, or NULL if we're at the end of the list. This can | 264 // Current TabContents, or NULL if we're at the end of the list. This can |
262 // be extracted given the browser iterator and index, but it's nice to cache | 265 // be extracted given the browser iterator and index, but it's nice to cache |
263 // this since the caller may access the current host many times. | 266 // this since the caller may access the current host many times. |
264 TabContentsWrapper* cur_; | 267 TabContentsWrapper* cur_; |
265 }; | 268 }; |
266 | 269 |
267 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 270 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
OLD | NEW |