summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 01:17:20 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 01:17:20 +0000
commitd0a47e21b6f4be0208fb7a30163ead7542ef30a4 (patch)
tree8aa4602d127745c66d84b468d7ea9b1a9e2cf42d /ash
parent7d111eef57c56d9d7d24f37276760db6861a4411 (diff)
downloadchromium_src-d0a47e21b6f4be0208fb7a30163ead7542ef30a4.zip
chromium_src-d0a47e21b6f4be0208fb7a30163ead7542ef30a4.tar.gz
chromium_src-d0a47e21b6f4be0208fb7a30163ead7542ef30a4.tar.bz2
Removing unused RemoveObserver (ReleaseBlocker)
Background: This was a remainder from my initial attempt to re-use the tray bubble. Looking at the code I don't see a reason why I should remove the observer when I have never set it in the first place. I assume that usually no harm was done when the owning anchor buttons still existed upon destruction. However - when the button is gone it is obvious that that can't be good. BUG=143716 TEST=visual Review URL: https://chromiumcodereview.appspot.com/10867014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/maximize_bubble_controller.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/ash/wm/maximize_bubble_controller.cc b/ash/wm/maximize_bubble_controller.cc
index 5d3aee0..4ba13ec 100644
--- a/ash/wm/maximize_bubble_controller.cc
+++ b/ash/wm/maximize_bubble_controller.cc
@@ -517,21 +517,19 @@ gfx::Size MaximizeBubbleController::Bubble::GetPreferredSize() {
}
void MaximizeBubbleController::Bubble::OnWidgetClosing(views::Widget* widget) {
- if (bubble_widget_ != widget)
- return;
-
- mouse_watcher_->Stop();
-
- if (owner_) {
- // If the bubble destruction was triggered by some other external influence
- // then ourselves, the owner needs to be informed that the menu is gone.
- shutting_down_ = true;
- owner_->RequestDestructionThroughOwner();
- owner_ = NULL;
+ if (bubble_widget_ == widget) {
+ mouse_watcher_->Stop();
+
+ if (owner_) {
+ // If the bubble destruction was triggered by some other external
+ // influence then ourselves, the owner needs to be informed that the menu
+ // is gone.
+ shutting_down_ = true;
+ owner_->RequestDestructionThroughOwner();
+ owner_ = NULL;
+ }
}
- // Remove any existing observers.
- bubble_widget_->RemoveObserver(this);
- anchor_widget()->RemoveObserver(this);
+ BubbleDelegateView::OnWidgetClosing(widget);
}
void MaximizeBubbleController::Bubble::ControllerRequestsCloseAndDelete() {