| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Send out notifications. | 195 // Send out notifications. |
| 196 // For ChromeOS, also request session manager to end the session. | 196 // For ChromeOS, also request session manager to end the session. |
| 197 static void NotifyAndTerminate(bool fast_path); | 197 static void NotifyAndTerminate(bool fast_path); |
| 198 | 198 |
| 199 // Called once there are no more browsers open and the application is exiting. | 199 // Called once there are no more browsers open and the application is exiting. |
| 200 static void AllBrowsersClosedAndAppExiting(); | 200 static void AllBrowsersClosedAndAppExiting(); |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 // Helper method to remove a browser instance from a list of browsers | 203 // Helper method to remove a browser instance from a list of browsers |
| 204 static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list); | 204 static void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list); |
| 205 static void MarkAsCleanShutdown(); | 205 static void MarkAsCleanShutdownInUserProfiles(); |
| 206 static void AttemptExitInternal(); | 206 static void AttemptExitInternal(); |
| 207 | 207 |
| 208 static BrowserVector browsers_; | 208 static BrowserVector browsers_; |
| 209 static BrowserVector last_active_browsers_; | 209 static BrowserVector last_active_browsers_; |
| 210 static ObserverList<Observer> observers_; | 210 static ObserverList<Observer> observers_; |
| 211 | 211 |
| 212 // Counter of calls to StartKeepAlive(). If non-zero, the application will | 212 // Counter of calls to StartKeepAlive(). If non-zero, the application will |
| 213 // continue running after the last browser has exited. | 213 // continue running after the last browser has exited. |
| 214 static int keep_alive_count_; | 214 static int keep_alive_count_; |
| 215 }; | 215 }; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // iterator over the TabContentsWrappers doing background printing. | 279 // iterator over the TabContentsWrappers doing background printing. |
| 280 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; | 280 std::set<TabContentsWrapper*>::const_iterator bg_printing_iterator_; |
| 281 | 281 |
| 282 // Current TabContents, or NULL if we're at the end of the list. This can | 282 // Current TabContents, or NULL if we're at the end of the list. This can |
| 283 // be extracted given the browser iterator and index, but it's nice to cache | 283 // be extracted given the browser iterator and index, but it's nice to cache |
| 284 // this since the caller may access the current host many times. | 284 // this since the caller may access the current host many times. |
| 285 TabContentsWrapper* cur_; | 285 TabContentsWrapper* cur_; |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 288 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |