Chromium Code Reviews| Index: ui/views/corewm/tooltip_controller.cc |
| =================================================================== |
| --- ui/views/corewm/tooltip_controller.cc (revision 223170) |
| +++ ui/views/corewm/tooltip_controller.cc (working copy) |
| @@ -87,6 +87,8 @@ |
| // Displays a widget with tooltip using a views::Label. |
| class TooltipController::Tooltip : public views::WidgetObserver { |
| public: |
| + friend class TooltipController; |
| + |
| Tooltip(TooltipController* controller) |
| : controller_(controller), |
| widget_(NULL) { |
| @@ -123,7 +125,6 @@ |
| width += 2 * kTooltipBorderWidth; |
| height += 2 * kTooltipBorderWidth; |
| } |
| - GetWidgetForWindow(window); |
| SetTooltipBounds(location, width, height); |
|
sky
2013/09/16 22:46:51
Won't this mean we potentially set the bounds only
ananta
2013/09/16 23:45:46
As per our discussion, we now destroy the tooltip
|
| } |
| @@ -528,6 +529,8 @@ |
| TooltipController::Tooltip* TooltipController::GetTooltip() { |
| if (!tooltip_.get()) |
| tooltip_.reset(new Tooltip(this)); |
| + if (tooltip_window_) |
| + tooltip_->GetWidgetForWindow(tooltip_window_); |
|
sky
2013/09/16 22:46:51
I know we discussed invoking GetWidgetForWindow, b
ananta
2013/09/16 23:45:46
This is no longer needed.
|
| return tooltip_.get(); |
| } |