| 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 string16 GetWindowTitleForCurrentTab() const; | 271 string16 GetWindowTitleForCurrentTab() const; |
| 272 | 272 |
| 273 // Prepares a title string for display (removes embedded newlines, etc). | 273 // Prepares a title string for display (removes embedded newlines, etc). |
| 274 static void FormatTitleForDisplay(string16* title); | 274 static void FormatTitleForDisplay(string16* title); |
| 275 | 275 |
| 276 // OnBeforeUnload handling ////////////////////////////////////////////////// | 276 // OnBeforeUnload handling ////////////////////////////////////////////////// |
| 277 | 277 |
| 278 // Gives beforeunload handlers the chance to cancel the close. | 278 // Gives beforeunload handlers the chance to cancel the close. |
| 279 bool ShouldCloseWindow(); | 279 bool ShouldCloseWindow(); |
| 280 | 280 |
| 281 bool IsAttemptingToCloseBrowser() const { |
| 282 return is_attempting_to_close_browser_; |
| 283 } |
| 284 |
| 281 // Invoked when the window containing us is closing. Performs the necessary | 285 // Invoked when the window containing us is closing. Performs the necessary |
| 282 // cleanup. | 286 // cleanup. |
| 283 void OnWindowClosing(); | 287 void OnWindowClosing(); |
| 284 | 288 |
| 285 // In-progress download termination handling ///////////////////////////////// | 289 // In-progress download termination handling ///////////////////////////////// |
| 286 | 290 |
| 287 // Called when the user has decided whether to proceed or not with the browser | 291 // Called when the user has decided whether to proceed or not with the browser |
| 288 // closure. |cancel_downloads| is true if the downloads should be canceled | 292 // closure. |cancel_downloads| is true if the downloads should be canceled |
| 289 // and the browser closed, false if the browser should stay open and the | 293 // and the browser closed, false if the browser should stay open and the |
| 290 // downloads running. | 294 // downloads running. |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 mutable BooleanPrefMember use_vertical_tabs_; | 1070 mutable BooleanPrefMember use_vertical_tabs_; |
| 1067 | 1071 |
| 1068 // The profile's tab restore service. The service is owned by the profile, | 1072 // The profile's tab restore service. The service is owned by the profile, |
| 1069 // and we install ourselves as an observer. | 1073 // and we install ourselves as an observer. |
| 1070 TabRestoreService* tab_restore_service_; | 1074 TabRestoreService* tab_restore_service_; |
| 1071 | 1075 |
| 1072 DISALLOW_COPY_AND_ASSIGN(Browser); | 1076 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1073 }; | 1077 }; |
| 1074 | 1078 |
| 1075 #endif // CHROME_BROWSER_BROWSER_H_ | 1079 #endif // CHROME_BROWSER_BROWSER_H_ |
| OLD | NEW |