| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 5 #ifndef UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| 6 #define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 6 #define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // has capture (with menus the first menu shown has capture). To enable this | 32 // has capture (with menus the first menu shown has capture). To enable this |
| 33 // if the NativeView that has capture has the same value for the property | 33 // if the NativeView that has capture has the same value for the property |
| 34 // |kGroupingPropertyKey| as the NativeView the mouse is over the tooltip is | 34 // |kGroupingPropertyKey| as the NativeView the mouse is over the tooltip is |
| 35 // shown. | 35 // shown. |
| 36 static const char kGroupingPropertyKey[]; | 36 static const char kGroupingPropertyKey[]; |
| 37 | 37 |
| 38 TooltipManager() {} | 38 TooltipManager() {} |
| 39 virtual ~TooltipManager() {} | 39 virtual ~TooltipManager() {} |
| 40 | 40 |
| 41 // Returns the maximum width of the tooltip. |point| gives the location | 41 // Returns the maximum width of the tooltip. |point| gives the location |
| 42 // the tooltip is to be displayed on in screen coordinates. |context| is | 42 // the tooltip is to be displayed on in screen coordinates. |
| 43 // used to determine which gfx::Screen should be used. | 43 virtual int GetMaxWidth(const gfx::Point& location) const = 0; |
| 44 virtual int GetMaxWidth(const gfx::Point& location, | |
| 45 gfx::NativeView context) const = 0; | |
| 46 | 44 |
| 47 // Returns the font list used for tooltips. | 45 // Returns the font list used for tooltips. |
| 48 virtual const gfx::FontList& GetFontList() const = 0; | 46 virtual const gfx::FontList& GetFontList() const = 0; |
| 49 | 47 |
| 50 // Notification that the view hierarchy has changed in some way. | 48 // Notification that the view hierarchy has changed in some way. |
| 51 virtual void UpdateTooltip() = 0; | 49 virtual void UpdateTooltip() = 0; |
| 52 | 50 |
| 53 // Invoked when the tooltip text changes for the specified views. | 51 // Invoked when the tooltip text changes for the specified views. |
| 54 virtual void TooltipTextChanged(View* view) = 0; | 52 virtual void TooltipTextChanged(View* view) = 0; |
| 55 }; | 53 }; |
| 56 | 54 |
| 57 } // namespace views | 55 } // namespace views |
| 58 | 56 |
| 59 #endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ | 57 #endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_H_ |
| OLD | NEW |