Chromium Code Reviews| Index: ui/views/corewm/tooltip_controller.cc |
| diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc |
| index a52c806a9928e56dd9a4f212c9535e1e456da06d..197bd07e3f50770dd29fd08dbe23aafd5af68a16 100644 |
| --- a/ui/views/corewm/tooltip_controller.cc |
| +++ b/ui/views/corewm/tooltip_controller.cc |
| @@ -308,6 +308,9 @@ void TooltipController::UpdateIfRequired() { |
| &tooltip_text_whitespace_trimmed_); |
| if (tooltip_text_whitespace_trimmed_.empty()) { |
| tooltip_->Hide(); |
| + if (tooltip_defer_timer_.IsRunning()) { |
|
sky
2017/01/26 18:25:37
no {}
chengx
2017/01/26 21:04:03
Done.
|
| + tooltip_defer_timer_.Reset(); |
| + } |
| } else if (tooltip_show_delayed_) { |
| // Initialize the one-shot timer to show the tooltip in a while. |
| // If there is already a request queued then cancel it and post the new |
| @@ -327,7 +330,7 @@ void TooltipController::UpdateIfRequired() { |
| } |
| void TooltipController::ShowTooltip() { |
| - if (!tooltip_window_) |
| + if (!tooltip_window_ || tooltip_text_whitespace_trimmed_.empty()) |
| return; |
| gfx::Point widget_loc = |
| curr_mouse_loc_ + tooltip_window_->GetBoundsInScreen().OffsetFromOrigin(); |