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

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

Issue 7694014: Reland: Implement correct Panel closing sequence for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed random result of CreateClose unittest caused by using a freed object. Created 9 years, 4 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
« no previous file with comments | « chrome/app/nibs/Panel.xib ('k') | chrome/browser/ui/panels/panel_app_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 102ac60b4b776d41e0bdcfedd18c66deb317eb8a..118d741303787fd7537f4412433bbf34639dd098 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -92,7 +92,14 @@ void Panel::SetBounds(const gfx::Rect& bounds) {
// close on the first attempt.
void Panel::Close() {
native_panel_->ClosePanel();
+
+// TODO(dimich): Only implemented fully async on Mac. Need to update other
+// platforms. The panel should be removed from PanelManager when and if it
+// was actually closed. The closing can be cancelled because of onbeforeunload
+// handler on the web page.
+#if !defined(OS_MACOSX)
manager()->Remove(this);
+#endif
}
void Panel::Activate() {
« no previous file with comments | « chrome/app/nibs/Panel.xib ('k') | chrome/browser/ui/panels/panel_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698