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

Unified Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 196603003: Reland r256396 Add views implementation for AXTreeSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | ui/accessibility/ax_tree_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/panels/panel_view.cc
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index 017cfbebf3e37bff67a7c5ad43c77a9c61dd64b0..e49a0fb6c6cf44292b76a06eac02010a15db8e94 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -311,6 +311,8 @@ PanelView::PanelView(Panel* panel, const gfx::Rect& bounds, bool always_on_top)
}
PanelView::~PanelView() {
+ if (window_)
+ window_->RemoveObserver(this);
}
void PanelView::ShowPanel() {
@@ -779,6 +781,7 @@ gfx::ImageSkia PanelView::GetWindowIcon() {
}
void PanelView::WindowClosing() {
+
// When closing a panel via window.close, API or the close button,
// ClosePanel() is called first, destroying the native |window_|
// which results in this method being called. ClosePanel() sets
@@ -948,7 +951,10 @@ bool PanelView::AcceleratorPressed(const ui::Accelerator& accelerator) {
}
void PanelView::OnWidgetDestroying(views::Widget* widget) {
- window_ = NULL;
+ if (window_) {
+ window_->RemoveObserver(this);
+ window_ = NULL;
+ }
}
void PanelView::OnWidgetActivationChanged(views::Widget* widget, bool active) {
« no previous file with comments | « no previous file | ui/accessibility/ax_tree_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698