| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // currently open. | 188 // currently open. |
| 189 static size_t GetBrowserCount(Profile* profile); | 189 static size_t GetBrowserCount(Profile* profile); |
| 190 | 190 |
| 191 // Return the number of browsers with the following profile and type which are | 191 // Return the number of browsers with the following profile and type which are |
| 192 // currently open. | 192 // currently open. |
| 193 static size_t GetBrowserCountForType(Profile* profile, bool match_tabbed); | 193 static size_t GetBrowserCountForType(Profile* profile, bool match_tabbed); |
| 194 | 194 |
| 195 // Returns true if at least one incognito session is active. | 195 // Returns true if at least one incognito session is active. |
| 196 static bool IsOffTheRecordSessionActive(); | 196 static bool IsOffTheRecordSessionActive(); |
| 197 | 197 |
| 198 // Returns true if at least one incognito session is active for |profile|. |
| 199 static bool IsOffTheRecordSessionActiveForProfile(Profile* profile); |
| 200 |
| 198 // Send out notifications. | 201 // Send out notifications. |
| 199 // For ChromeOS, also request session manager to end the session. | 202 // For ChromeOS, also request session manager to end the session. |
| 200 static void NotifyAndTerminate(bool fast_path); | 203 static void NotifyAndTerminate(bool fast_path); |
| 201 | 204 |
| 202 // Called once there are no more browsers open and the application is exiting. | 205 // Called once there are no more browsers open and the application is exiting. |
| 203 static void AllBrowsersClosedAndAppExiting(); | 206 static void AllBrowsersClosedAndAppExiting(); |
| 204 | 207 |
| 205 private: | 208 private: |
| 206 // Helper method to remove a browser instance from a list of browsers | 209 // Helper method to remove a browser instance from a list of browsers |
| 207 static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list); | 210 static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // iterator over the TabContentsWrappers doing background printing. | 285 // iterator over the TabContentsWrappers doing background printing. |
| 283 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; | 286 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; |
| 284 | 287 |
| 285 // Current TabContents, or NULL if we're at the end of the list. This can | 288 // Current TabContents, or NULL if we're at the end of the list. This can |
| 286 // be extracted given the browser iterator and index, but it's nice to cache | 289 // be extracted given the browser iterator and index, but it's nice to cache |
| 287 // this since the caller may access the current host many times. | 290 // this since the caller may access the current host many times. |
| 288 TabContentsWrapper* cur_; | 291 TabContentsWrapper* cur_; |
| 289 }; | 292 }; |
| 290 | 293 |
| 291 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 294 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |