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

Unified Diff: views/widget/tooltip_manager_views.cc

Issue 8418028: Destroy tooltip manager if the native window is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified according to comments Created 9 years, 2 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 | « views/widget/tooltip_manager_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/tooltip_manager_views.cc
diff --git a/views/widget/tooltip_manager_views.cc b/views/widget/tooltip_manager_views.cc
index a7d367bf487ba0f22d0ce8c98c1b24d70655db58..a8b6d975d8852898a715d07d465747265714acae 100644
--- a/views/widget/tooltip_manager_views.cc
+++ b/views/widget/tooltip_manager_views.cc
@@ -75,8 +75,7 @@ int TooltipManager::GetMaxWidth(int x, int y) {
TooltipManagerViews::TooltipManagerViews(views::View* root_view)
: root_view_(root_view),
- tooltip_view_(NULL),
- widget_closed_(false) {
+ tooltip_view_(NULL) {
tooltip_label_.set_background(
views::Background::CreateSolidBackground(kTooltipBackground));
tooltip_widget_.reset(CreateTooltip());
@@ -87,7 +86,6 @@ TooltipManagerViews::TooltipManagerViews(views::View* root_view)
base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
this, &TooltipManagerViews::TooltipTimerFired);
MessageLoopForUI::current()->AddObserver(this);
- root_view_->GetWidget()->AddObserver(this);
}
TooltipManagerViews::~TooltipManagerViews() {
@@ -152,11 +150,6 @@ void TooltipManagerViews::DidProcessEvent(const base::NativeEvent& event) {
}
#endif
-void TooltipManagerViews::OnWidgetClosing(Widget* widget) {
- tooltip_timer_.Stop();
- widget_closed_ = true;
-}
-
void TooltipManagerViews::TooltipTimerFired() {
UpdateIfRequired(curr_mouse_pos_.x(), curr_mouse_pos_.y(), false);
}
@@ -179,9 +172,6 @@ View* TooltipManagerViews::GetViewForTooltip(int x, int y, bool for_keyboard) {
}
void TooltipManagerViews::UpdateIfRequired(int x, int y, bool for_keyboard) {
- if (widget_closed_)
- return;
-
View* view = GetViewForTooltip(x, y, for_keyboard);
string16 tooltip_text;
if (view)
« no previous file with comments | « views/widget/tooltip_manager_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698