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_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
902 void CancelWindowClose(); | 902 void CancelWindowClose(); |
903 | 903 |
904 // Removes |tab| from the passed |set|. | 904 // Removes |tab| from the passed |set|. |
905 // Returns whether the tab was in the set in the first place. | 905 // Returns whether the tab was in the set in the first place. |
906 // TODO(beng): this method needs a better name! | 906 // TODO(beng): this method needs a better name! |
907 bool RemoveFromSet(UnloadListenerSet* set, TabContents* tab); | 907 bool RemoveFromSet(UnloadListenerSet* set, TabContents* tab); |
908 | 908 |
909 // Cleans up state appropriately when we are trying to close the browser and | 909 // Cleans up state appropriately when we are trying to close the browser and |
910 // the tab has finished firing its unload handler. We also use this in the | 910 // the tab has finished firing its unload handler. We also use this in the |
911 // cases where a tab crashes or hangs even if the beforeunload/unload haven't | 911 // cases where a tab crashes or hangs even if the beforeunload/unload haven't |
912 // successfully fired. | 912 // successfully fired. If |process_now| is true |ProcessPendingTabs| is |
913 void ClearUnloadState(TabContents* tab); | 913 // invoked immediately, otherwise it is invoked after a delay (PostTask). |
914 // Typically you'll want to pass in true for |process_now|. | |
brettw
2011/01/13 06:42:16
It might be nice if this mentioned why you might w
| |
915 void ClearUnloadState(TabContents* tab, bool process_now); | |
914 | 916 |
915 // In-progress download termination handling ///////////////////////////////// | 917 // In-progress download termination handling ///////////////////////////////// |
916 | 918 |
917 // Called when the window is closing to check if potential in-progress | 919 // Called when the window is closing to check if potential in-progress |
918 // downloads should prevent it from closing. | 920 // downloads should prevent it from closing. |
919 // Returns true if the window can close, false otherwise. | 921 // Returns true if the window can close, false otherwise. |
920 bool CanCloseWithInProgressDownloads(); | 922 bool CanCloseWithInProgressDownloads(); |
921 | 923 |
922 // Assorted utility functions /////////////////////////////////////////////// | 924 // Assorted utility functions /////////////////////////////////////////////// |
923 | 925 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1131 // and we install ourselves as an observer. | 1133 // and we install ourselves as an observer. |
1132 TabRestoreService* tab_restore_service_; | 1134 TabRestoreService* tab_restore_service_; |
1133 | 1135 |
1134 scoped_ptr<InstantController> instant_; | 1136 scoped_ptr<InstantController> instant_; |
1135 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1137 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
1136 | 1138 |
1137 DISALLOW_COPY_AND_ASSIGN(Browser); | 1139 DISALLOW_COPY_AND_ASSIGN(Browser); |
1138 }; | 1140 }; |
1139 | 1141 |
1140 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1142 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |