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

Unified Diff: chrome/browser/chromeos/frame/panel_controller.cc

Issue 6247002: chromeos: Run beforeunload handlers when closing panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/chromeos/frame/panel_controller.cc
diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc
index 31f4961fe9237ccd7bd0a03310c682530fac2299..4de770b922b5bed1a168f8c192c065b9f4a56c1e 100644
--- a/chrome/browser/chromeos/frame/panel_controller.cc
+++ b/chrome/browser/chromeos/frame/panel_controller.cc
@@ -306,8 +306,11 @@ void PanelController::Close() {
void PanelController::OnCloseButtonPressed() {
DCHECK(title_content_);
if (title_window_) {
- if (delegate_)
+ if (delegate_) {
+ if (!delegate_->CanClosePanel())
oshima 2011/01/13 21:18:12 This may not be the scope of this CL, but wouldn't
Daniel Erat 2011/01/13 21:26:34 In the case of a beforeunload handler, a modal dia
+ return;
delegate_->ClosePanel();
+ }
Close();
}
}
« no previous file with comments | « chrome/browser/chromeos/frame/panel_controller.h ('k') | chrome/browser/chromeos/notifications/notification_panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698