DescriptionMacViews: Implement Tooltips
After some experimentation, I couldn't improve on the techniques
currently used in render_widget_host_view_mac.mm to provide tooltips.
They also work well in MacViews, so encapsulate them in a shared base
class, `ToolTipBaseView' and put it in ui/base/cocoa.
As a result, BridgedNativeWidget is now also a `BaseView` instead of
just an NSView. This actually allows some boilerplate to go since some
useful stuff gets inherited from BaseView.
Note: Cocoa capitalizes as "ToolTip", and toolkit-views as "Tooltip". In
this CL, aim for "Tooltip" unless the code is used completely outside of
toolkit-views.
As a bonus, MenuButtonTest.MenuButtonPressedLock now passes. This is
because functionality was added to the Mac EventGenerator to simulate
cursor position, which ScreenMac::GetCursorScreenPoint() is able to take
advantage of in tests.
BUG=441543, 378134
TEST=views_unittests (now just 6 failures, 1 crash).
NOPRESUBMIT=true
Committed: https://crrev.com/f3dbf91f48e6e97abe51d562c806c8c847ebb2fb
Cr-Commit-Position: refs/heads/master@{#330483}
Patch Set 1 #Patch Set 2 : un-cl-format tool_tip_base_view.mm due to copyright? #Patch Set 3 : Tests! #Patch Set 4 : tweaks #Patch Set 5 : learn to alphabet tapted #
Total comments: 1
Patch Set 6 : @class ToolTip is not a thing #
Total comments: 10
Patch Set 7 : rebase #Patch Set 8 : respond to comments #Messages
Total messages: 28 (12 generated)
|