Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: chrome/browser/ui/browser.h

Issue 17571018: Reland fast tab closure behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, 2nd attempt to land. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 2766b78f91c24291f713270f1aaa0afe2c5b3f66..62f6ba6520730edc663905290f7ed58ac4bc309d 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -66,6 +66,7 @@ struct WebApplicationInfo;
namespace chrome {
class BrowserCommandController;
+class FastUnloadController;
class UnloadController;
}
@@ -293,6 +294,13 @@ class Browser : public TabStripModelObserver,
// Gives beforeunload handlers the chance to cancel the close.
bool ShouldCloseWindow();
+ // Figure out if there are tabs that have beforeunload handlers.
+ // It starts beforeunload/unload processing as a side-effect.
+ bool TabsNeedBeforeUnloadFired();
+
+ // Returns true if all tabs' beforeunload/unload events have fired.
+ bool HasCompletedUnloadProcessing() const;
+
bool IsAttemptingToCloseBrowser() const;
// Invoked when the window containing us is closing. Performs the necessary
@@ -430,9 +438,6 @@ class Browser : public TabStripModelObserver,
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) OVERRIDE;
- // Figure out if there are tabs that have beforeunload handlers.
- bool TabsNeedBeforeUnloadFired();
-
bool is_type_tabbed() const { return type_ == TYPE_TABBED; }
bool is_type_popup() const { return type_ == TYPE_POPUP; }
@@ -865,6 +870,7 @@ class Browser : public TabStripModelObserver,
const chrome::HostDesktopType host_desktop_type_;
scoped_ptr<chrome::UnloadController> unload_controller_;
+ scoped_ptr<chrome::FastUnloadController> fast_unload_controller_;
// The following factory is used to close the frame at a later time.
base::WeakPtrFactory<Browser> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698