| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // CloseAllBrowsers(true) on platforms where the application exits when no | 103 // CloseAllBrowsers(true) on platforms where the application exits when no |
| 104 // more windows are remaining. On other platforms (the Mac), this will | 104 // more windows are remaining. On other platforms (the Mac), this will |
| 105 // additionally exit the application. | 105 // additionally exit the application. |
| 106 static void CloseAllBrowsersAndExit(); | 106 static void CloseAllBrowsersAndExit(); |
| 107 | 107 |
| 108 // Closes all browsers. If the session is ending the windows are closed | 108 // Closes all browsers. If the session is ending the windows are closed |
| 109 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE | 109 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE |
| 110 // message. | 110 // message. |
| 111 static void CloseAllBrowsers(); | 111 static void CloseAllBrowsers(); |
| 112 | 112 |
| 113 // Begins shutdown of the application when the session is ending. | 113 // Begins shutdown of the application when the desktop session is ending. |
| 114 static void SessionEnding(); | 114 static void SessionEnding(); |
| 115 | 115 |
| 116 // Returns true if there is at least one Browser with the specified profile. | 116 // Returns true if there is at least one Browser with the specified profile. |
| 117 static bool HasBrowserWithProfile(Profile* profile); | 117 static bool HasBrowserWithProfile(Profile* profile); |
| 118 | 118 |
| 119 // Tells the BrowserList to keep the application alive after the last Browser | 119 // Tells the BrowserList to keep the application alive after the last Browser |
| 120 // closes. This is implemented as a count, so callers should pair their calls | 120 // closes. This is implemented as a count, so callers should pair their calls |
| 121 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no | 121 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no |
| 122 // longer need to keep the application running. | 122 // longer need to keep the application running. |
| 123 static void StartKeepAlive(); | 123 static void StartKeepAlive(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // tab index into the current Browser of the current web view | 247 // tab index into the current Browser of the current web view |
| 248 int web_view_index_; | 248 int web_view_index_; |
| 249 | 249 |
| 250 // Current TabContents, or NULL if we're at the end of the list. This can | 250 // Current TabContents, or NULL if we're at the end of the list. This can |
| 251 // be extracted given the browser iterator and index, but it's nice to cache | 251 // be extracted given the browser iterator and index, but it's nice to cache |
| 252 // this since the caller may access the current host many times. | 252 // this since the caller may access the current host many times. |
| 253 TabContents* cur_; | 253 TabContents* cur_; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 256 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |