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

Unified Diff: ash/launcher/launcher_view.cc

Issue 24141003: ash: Fix crash in launcher tooltip manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix nit Created 7 years, 3 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 | « ash/launcher/launcher_tooltip_manager.h ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 57bcf26abb191d68acd2c55fdc38db837e3f556c..cb6c4372884407df03881e4138441cfd309265a7 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -477,7 +477,7 @@ void LauncherView::OnShelfAlignmentChanged() {
if (i >= first_visible_index_ && i <= last_visible_index_)
view_model_->view_at(i)->Layout();
}
- tooltip_->UpdateArrow();
+ tooltip_->Close();
if (overflow_bubble_)
overflow_bubble_->Hide();
}
@@ -1452,6 +1452,11 @@ void LauncherView::LauncherItemRemoved(int model_index, LauncherID id) {
view_model_->view_size() - 1);
UpdateOverflowRange(overflow_bubble_->launcher_view());
}
+
+ // Close the tooltip because it isn't needed any longer and its anchor view
+ // will be deleted soon.
+ if (tooltip_->GetCurrentAnchorView() == view)
+ tooltip_->Close();
}
void LauncherView::LauncherItemChanged(int model_index,
« no previous file with comments | « ash/launcher/launcher_tooltip_manager.h ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698