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

Unified Diff: ui/views/corewm/tooltip_aura.h

Issue 924433002: Use RenderText directly to draw tooltip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: ui/views/corewm/tooltip_aura.h
diff --git a/ui/views/corewm/tooltip_aura.h b/ui/views/corewm/tooltip_aura.h
index ce92fa25d151a77ab14ead3eb4576419ac133cb1..7343b903092dcdc0fca8d41b89dbbcd0cbdb3726 100644
--- a/ui/views/corewm/tooltip_aura.h
+++ b/ui/views/corewm/tooltip_aura.h
@@ -6,12 +6,12 @@
#define UI_VIEWS_COREWM_TOOLTIP_AURA_H_
#include "ui/gfx/screen_type_delegate.h"
-#include "ui/views/controls/label.h"
#include "ui/views/corewm/tooltip.h"
#include "ui/views/widget/widget_observer.h"
namespace gfx {
class FontList;
+class Size;
} // namespace gfx
namespace views {
@@ -26,17 +26,9 @@ class VIEWS_EXPORT TooltipAura : public Tooltip, public WidgetObserver {
TooltipAura();
~TooltipAura() override;
- // Trims the tooltip to fit in the width |max_width|, setting |text| to the
- // clipped result, |width| to the width (in pixels) of the clipped text
- // and |line_count| to the number of lines of text in the tooltip. |font_list|
- // is used to layout |text|. |max_width| comes from GetMaxWidth().
- static void TrimTooltipToFit(const gfx::FontList& font_list,
- int max_width,
- base::string16* text,
- int* width,
- int* line_count);
-
private:
+ class TooltipView;
+
// Adjusts the bounds given by the arguments to fit inside the desktop
// and applies the adjusted bounds to the label_.
void SetTooltipBounds(const gfx::Point& mouse_pos,
@@ -58,8 +50,8 @@ class VIEWS_EXPORT TooltipAura : public Tooltip, public WidgetObserver {
// WidgetObserver:
void OnWidgetDestroying(Widget* widget) override;
- // The label showing the tooltip.
- Label label_;
+ // The view showing the tooltip.
+ TooltipView* tooltip_view_;
// The widget containing the tooltip. May be NULL.
Widget* widget_;

Powered by Google App Engine
This is Rietveld 408576698