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

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

Issue 8505047: Fix panels being removed from PanelManager prematurely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test. Created 9 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/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index b2311362c55cf3a30a115618364754158e944910..b638068336c12fdee96e0d02e8bbdf9336be3727 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -47,6 +47,10 @@ Panel::Panel(Browser* browser, const gfx::Rect& bounds)
Panel::~Panel() {
// Invoked by native panel so do not access native_panel_ here.
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_PANEL_DELETED,
+ content::Source<Panel>(this),
+ content::NotificationService::NoDetails());
}
PanelManager* Panel::manager() const {
@@ -168,14 +172,6 @@ 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. http://crbug.com/102720
-#if !defined(OS_MACOSX)
- manager()->Remove(this);
-#endif
}
void Panel::Activate() {
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | chrome/browser/ui/panels/panel_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698