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

Issue 1137653005: MacViews: Implement Tooltips (Closed)

Created:
5 years, 7 months ago by tapted
Modified:
5 years, 7 months ago
CC:
chromium-reviews, tdanderson+views_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, tfarina, James Su, android-webview-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -272 lines) Patch
M android_webview/tools/third_party_files_whitelist.txt View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 5 chunks +4 lines, -12 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 1 chunk +0 lines, -187 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A ui/base/cocoa/tool_tip_base_view.h View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A ui/base/cocoa/tool_tip_base_view.mm View 1 1 chunk +198 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.h View 1 2 3 4 5 6 7 4 chunks +13 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 6 chunks +43 lines, -59 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
A ui/views/cocoa/tooltip_manager_mac.h View 1 2 3 4 5 6 7 1 chunk +35 lines, -0 lines 0 comments Download
A ui/views/cocoa/tooltip_manager_mac.mm View 1 2 3 4 5 6 7 1 chunk +56 lines, -0 lines 0 comments Download
M ui/views/test/event_generator_delegate_mac.mm View 1 2 9 chunks +29 lines, -7 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M ui/views/widget/native_widget_mac_unittest.mm View 1 2 3 2 chunks +72 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
tapted
andre: please take a look for general review in ui/views/cocoa/* and *native_widget_mac* avi: please take ...
5 years, 7 months ago (2015-05-13 01:51:33 UTC) #4
Avi (use Gerrit)
If this is just a move (which it looks like it is), LGTM.
5 years, 7 months ago (2015-05-13 02:57:01 UTC) #5
tapted
On 2015/05/13 02:57:01, Avi wrote: > If this is just a move (which it looks ...
5 years, 7 months ago (2015-05-13 03:09:39 UTC) #6
Andre
https://codereview.chromium.org/1137653005/diff/100001/ui/views/cocoa/bridged_content_view.h File ui/views/cocoa/bridged_content_view.h (right): https://codereview.chromium.org/1137653005/diff/100001/ui/views/cocoa/bridged_content_view.h#newcode12 ui/views/cocoa/bridged_content_view.h:12: #import "ui/base/cocoa/tool_tip_base_view.h" Sorts before tracking_area.h. https://codereview.chromium.org/1137653005/diff/100001/ui/views/cocoa/bridged_content_view.h#newcode59 ui/views/cocoa/bridged_content_view.h:59: - (void)updateTooltipIfRequiredAt:(const ...
5 years, 7 months ago (2015-05-13 19:33:13 UTC) #7
tapted
https://codereview.chromium.org/1137653005/diff/100001/ui/views/cocoa/bridged_content_view.h File ui/views/cocoa/bridged_content_view.h (right): https://codereview.chromium.org/1137653005/diff/100001/ui/views/cocoa/bridged_content_view.h#newcode12 ui/views/cocoa/bridged_content_view.h:12: #import "ui/base/cocoa/tool_tip_base_view.h" On 2015/05/13 19:33:13, Andre wrote: > Sorts ...
5 years, 7 months ago (2015-05-15 07:59:55 UTC) #10
Andre
LGTM
5 years, 7 months ago (2015-05-15 16:42:50 UTC) #11
tapted
+sgurun for OWNERS in android_webview/tools/third_party_files_whitelist.txt (just a move). Thanks!
5 years, 7 months ago (2015-05-18 23:03:50 UTC) #13
sgurun-gerrit only
On 2015/05/18 23:03:50, tapted wrote: > +sgurun for OWNERS in android_webview/tools/third_party_files_whitelist.txt > (just a move). ...
5 years, 7 months ago (2015-05-19 03:00:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137653005/180001
5 years, 7 months ago (2015-05-19 03:34:55 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/64524)
5 years, 7 months ago (2015-05-19 03:42:04 UTC) #19
tapted
On 2015/05/19 03:42:04, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 7 months ago (2015-05-19 03:46:16 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137653005/180001
5 years, 7 months ago (2015-05-19 03:47:38 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/90269)
5 years, 7 months ago (2015-05-19 04:53:55 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137653005/180001
5 years, 7 months ago (2015-05-19 05:37:25 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:180001)
5 years, 7 months ago (2015-05-19 06:14:02 UTC) #27
commit-bot: I haz the power
5 years, 7 months ago (2015-05-19 06:15:09 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f3dbf91f48e6e97abe51d562c806c8c847ebb2fb
Cr-Commit-Position: refs/heads/master@{#330483}

Powered by Google App Engine
This is Rietveld 408576698