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

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

Issue 23835007: DevTools: Do not close devtools if there are dirty files in workspace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revisiting naming & comments Created 7 years, 1 month 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.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4f42a36f33c00870773a135baccfd22ddb214bb1..09284bcabdf2386d351248dbee7aa532946dec68 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -832,6 +832,13 @@ void Browser::UpdateDownloadShelfVisibility(bool visible) {
///////////////////////////////////////////////////////////////////////////////
// static
+bool Browser::ShouldRunUnloadEventsHelper(content::WebContents* contents) {
+ if (IsFastTabUnloadEnabled())
+ return chrome::FastUnloadController::ShouldRunUnloadEventsHelper(contents);
+ return chrome::UnloadController::ShouldRunUnloadEventsHelper(contents);
+}
+
+// static
bool Browser::RunUnloadEventsHelper(WebContents* contents) {
if (IsFastTabUnloadEnabled())
return chrome::FastUnloadController::RunUnloadEventsHelper(contents);
@@ -1430,6 +1437,10 @@ gfx::Rect Browser::GetRootWindowResizerRect() const {
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
+ if (is_devtools() && DevToolsWindow::HandleBeforeUnload(web_contents,
+ proceed, proceed_to_fire_unload))
+ return;
+
if (IsFastTabUnloadEnabled()) {
*proceed_to_fire_unload =
fast_unload_controller_->BeforeUnloadFired(web_contents, proceed);

Powered by Google App Engine
This is Rietveld 408576698