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

Unified Diff: ui/views/corewm/tooltip_controller.cc

Issue 23958012: Create the Tooltip widget in Aura as needed instead of just creating it in the timer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698